-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Update CRA Webpack configuration path #5079
Conversation
app/react/src/server/cra-config.js
Outdated
@@ -81,8 +81,7 @@ export const getTypeScriptRules = (webpackConfigRules, configDir) => { | |||
export function getCraWebpackConfig(mode) { | |||
const pathToReactScripts = getReactScriptsPath(); | |||
|
|||
const craWebpackConfig = | |||
mode === 'production' ? 'config/webpack.config.prod' : 'config/webpack.config.dev'; | |||
const craWebpackConfig = 'config/webpack.config'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I shouldn't do that due to backward compatibility with older versions of CRA and react-scripts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a check for this. Let's see if CI passes.
Codecov Report
@@ Coverage Diff @@
## next #5079 +/- ##
=======================================
Coverage 35.06% 35.06%
=======================================
Files 593 593
Lines 7347 7347
Branches 1005 1004 -1
=======================================
Hits 2576 2576
- Misses 4258 4259 +1
+ Partials 513 512 -1
Continue to review full report at Codecov.
|
This is a duplicate of #5074. |
Issue: #5077
What I did
I have updated
cra-config.js
to handle the Webpack configuration merge in CRA 2.1.2. This breaks projects running an older version of CRA. Shouldcra-kitchen-sink
be updated to reflect this?Related PR: #5074
How to test
Run Storybook in a project with version 2.1.2 of
react-scripts
in its dependencies.