fix: ensure standalone node_modules are included in packaged app
- Split extraResources to explicitly copy node_modules separately (electron-builder excludes node_modules by default) - Exclude unnecessary project files from asar bundle - Fixes 'Cannot find module next' error in packaged app Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
37e5e4ed71
commit
43e79dec04
1 file changed
+16
-3
+16
-3
@@ -4,12 +4,25 @@ directories:
|
||||
output: release
|
||||
files:
|
||||
- dist-electron/**/*
|
||||
- .next/standalone/**/*
|
||||
- .next/static/**/*
|
||||
- public/**/*
|
||||
- "!node_modules"
|
||||
- "!src"
|
||||
- "!electron"
|
||||
- "!.next"
|
||||
- "!build"
|
||||
- "!scripts"
|
||||
- "!docs"
|
||||
- "!release"
|
||||
extraResources:
|
||||
- from: .next/standalone/
|
||||
to: standalone/
|
||||
filter:
|
||||
- "**/*"
|
||||
- "!node_modules"
|
||||
- from: .next/standalone/node_modules/
|
||||
to: standalone/node_modules/
|
||||
filter: ["**/*"]
|
||||
- from: .next/standalone/.next/
|
||||
to: standalone/.next/
|
||||
filter: ["**/*"]
|
||||
- from: .next/static/
|
||||
to: standalone/.next/static/
|
||||
|
||||
Reference in new issue
Block a user