Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

electron-builder shoud search for react-script in package dependencies as well as devDependencies #2532

Closed
lbssousa opened this issue Jan 29, 2018 · 4 comments · May be fixed by qcif/data-curator#563
Labels

Comments

@lbssousa
Copy link

  • Version: 19.55.2
  • Target: any

Since create-react-app release 1.0.8, package react-scripts is included in dependencies (not devDependencies) section of file package.json. If I don't move it manually to devDependencies section, electron-builder won't be able to detect it and apply the required config extensions.

So I suggest to electron-builder to search for react-scripts in package.json's dependencies section rather than devDependencies (or both ones, if you intend to support CRA versions older than 1.0.8 as well).

@timkendrick
Copy link

@develar if I understand this correctly, I suspect that this fix is actually a bad idea.

I say this because I filed issue #2449 a few weeks ago but haven't received a response – in the app I'm building, react-scripts is one of dependencies, explicitly because it is intended to be bundled in the output.

Surely if react-scripts is incorrectly being set as one of the dependencies, rather than the devDependencies, then that's a problem with create-react-app, and not something that should be worked around in electron builder?

@timkendrick
Copy link

Sorry, just realised that this issue only concerns the automatic config detection, not the fact that react-scripts is excluded from the output bundle.

All the same, it seems weird that electron builder should automatically switch to a different config when I'm not even using create-react-app to build my app…

@develar
Copy link
Member

develar commented Jan 31, 2018

@timkendrick I believe that @lbssousa is not wrong. But I see your point, if need, you can always set extends to null. I hope current behaviour doesn't lead to incorrect behaviour (I have fixed #2449 ).

@timkendrick
Copy link

thanks @develar!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants