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

Update CRA Webpack configuration path #5079

Closed
wants to merge 2 commits into from
Closed

Update CRA Webpack configuration path #5079

wants to merge 2 commits into from

Conversation

coka
Copy link

@coka coka commented Dec 24, 2018

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. Should cra-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.

@@ -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';

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

Copy link
Author

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.

@storybook-safe-bot
Copy link
Contributor

storybook-safe-bot commented Dec 24, 2018

Fails
🚫

PR is not labeled with one of: ["cleanup","doc-dependencies:update","BREAKING CHANGE","feature request","bug","documentation","maintenance","dependencies:update","dependencies","other"]

Generated by 🚫 dangerJS against 43096e2

@codecov
Copy link

codecov bot commented Dec 24, 2018

Codecov Report

Merging #5079 into next will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           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
Impacted Files Coverage Δ
app/react/src/server/cra-config.js 47.05% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99fe0a8...43096e2. Read the comment docs.

@mrmckeb
Copy link
Member

mrmckeb commented Dec 25, 2018

This is a duplicate of #5074.

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

Successfully merging this pull request may close these issues.

5 participants