A electron project will have a lot node_modules dependent, if reliance is npm
installed itself with a large number of Symbol Link. Electron.build not a direct copy of the directory node_modules project in the past, but to restore all Symbol Link to the actual document.
In addition, it is only on package.json
the dependency
field for processing, it is possible to run the program in debug mode, packing situation will not run, there may be the require(module_name)
cause of not found. Packager being given in conjunction with log analysis.
If you want to bypass electron.build treatment for dependence, can be package.json
a extraResources
field specifies additional content
"extraResources": [
{
"from": "./server",
"to": "./server"
}]
At this time the content will be directly under the server directory to copy the target directory without the screening.