saltyshiomix / nextron

⚡ Next.js + Electron ⚡
https://npm.im/nextron
MIT License
3.97k stars 229 forks source link

Create separation between dependencies and devDependencies #68

Closed jerrygreen closed 3 years ago

jerrygreen commented 4 years ago

https://github.com/saltyshiomix/nextron/blob/0d036e6a2408b31c88ff806ade51b057a2f2795c/examples/api-routes/package.json#L13-L25

Even next, react, react-dom in devDependencies? Shouldn't they be in dependencies? Am I misunderstanding something?

lacymorrow commented 4 years ago

@JerryGreen Technically all dependencies are devDependencies in this case, since next exports a bundle that is "The" dependency of the final build.

That being said, we should create some separation just for semantics sake of:

saltyshiomix commented 4 years ago

@JerryGreen @lacymorrow

Sorry for late reply for this issue.

Nextron copies whole node_modules of the dependencies when production build. (See electrion-builder.yml.)

But it uses next and the electron renderer process is built by next so we don't need node_modules.

So if you want to include react in the dependencies, to reduce the bundled size, please exclude react in the electron-builder.yml :)