Skip to content

Commit

Permalink
build(backend): try pkgroll for backend bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
hejtful committed Sep 25, 2024
1 parent b217aef commit 4315782
Show file tree
Hide file tree
Showing 3 changed files with 424 additions and 4 deletions.
18 changes: 17 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,23 @@
"license": "Apache-2.0",
"author": "Serlo Education e.V.",
"type": "module",
"exports": {
"require": {
"types": "./dist/backend/index.d.cts",
"default": "./dist/backend/index.cjs"
},
"import": {
"types": "./dist/backend/index.d.mts",
"default": "./dist/backend/index.mjs"
}
},
"main": "./dist/backend/index.cjs",
"module": "./dist/backend/index.mjs",
"types": "./dist/backend/index.d.cts",
"scripts": {
"build": "tsc && vite build",
"build": "npm-run-all --parallel \"build:*\"",
"build:backend": "pkgroll",
"build:frontend": "tsc && vite build",
"dev": "docker compose up --watch --build",
"format": "npm-run-all --sequential --continue-on-error \"format:*\"",
"format:eslint": "eslint --fix",
Expand Down Expand Up @@ -54,6 +69,7 @@
"eslint-plugin-react-refresh": "^0.4.11",
"globals": "^15.9.0",
"npm-run-all": "^4.1.5",
"pkgroll": "^2.5.0",
"prettier": "3.3.3",
"prettier-plugin-packagejson": "^2.5.2",
"typescript-eslint": "^8.4.0",
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ import react from '@vitejs/plugin-react-swc'

// https://vitejs.dev/config/
export default defineConfig({
build: {
outDir: './dist/frontend',
},
plugins: [react()],
})
Loading

0 comments on commit 4315782

Please sign in to comment.