You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
@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?
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…
@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 ).
Since create-react-app release 1.0.8, package
react-scripts
is included independencies
(notdevDependencies
) section of filepackage.json
. If I don't move it manually todevDependencies
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'sdependencies
section rather thandevDependencies
(or both ones, if you intend to support CRA versions older than 1.0.8 as well).The text was updated successfully, but these errors were encountered: