mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-17 14:17:21 +00:00
fix(build): output server bundle as .cjs for ES module compatibility
- Change server output from index.js to index.cjs - Update start script to run index.cjs - Fixes 'module is not defined' error on Railway - CommonJS format explicit with .cjs extension Resolves module format conflict where package.json has 'type: module' but server bundle uses CommonJS format
This commit is contained in:
parent
36a7305cf6
commit
8efae10378
2 changed files with 2 additions and 2 deletions
|
|
@ -18,7 +18,7 @@
|
|||
"cap:live-reload:ios": "tsx script/capacitor-live-reload.ts --ios",
|
||||
"cap:production": "tsx script/capacitor-production.ts",
|
||||
"dev:mobile": "npm run cap:live-reload && concurrently \"npm run dev\" \"echo 'Dev server started. Open Android Studio or Xcode to run the app.'\"",
|
||||
"start": "cross-env NODE_ENV=production node dist/index.js",
|
||||
"start": "cross-env NODE_ENV=production node dist/index.cjs",
|
||||
"check": "tsc",
|
||||
"db:push": "drizzle-kit push",
|
||||
"tauri": "cd shell/aethex-shell && npm run tauri",
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ async function buildAll() {
|
|||
platform: "node",
|
||||
bundle: true,
|
||||
format: "cjs",
|
||||
outfile: "dist/index.js",
|
||||
outfile: "dist/index.cjs",
|
||||
define: {
|
||||
"process.env.NODE_ENV": '"production"',
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue