electron.build treatment of dependence

A electron project will have a lot node_modules dependent, if reliance is npminstalled 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.jsonthe dependencyfield 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.jsona extraResourcesfield 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.

Guess you like

Origin www.cnblogs.com/zhaofeng-shu33/p/11204190.html