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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update CRA Webpack configuration path
  • Loading branch information
coka committed Dec 24, 2018
commit c16051cb19f6c83f1ca5224f151ee1f8d4f0898c
3 changes: 1 addition & 2 deletions app/react/src/server/cra-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.


let pathToWebpackConfig = require.resolve(path.join(pathToReactScripts, craWebpackConfig));

Expand Down