Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 5 additions & 3 deletions packages/react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,17 @@ module.exports = {
}
]
},
// @remove-on-eject-begin
// Point ESLint to our predefined config.
eslint: {
// @remove-on-eject-begin
// TODO: consider separate config for production,
// e.g. to enable no-console and no-debugger only in production.
configFile: path.join(__dirname, '../.eslintrc'),
useEslintrc: false
useEslintrc: false,
// @remove-on-eject-end
failOnWarning: !!process.env.CI,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to make sure this works after ejecting too.
So // @remove-on-eject-begin needs to move inside eslint config object.

failOnError: true
},
// @remove-on-eject-end
// We use PostCSS for autoprefixing only.
postcss: function() {
return [
Expand Down
5 changes: 0 additions & 5 deletions packages/react-scripts/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ function build(previousSizeMap) {
process.exit(1);
}

if (process.env.CI && stats.compilation.warnings.length) {
printErrors('Failed to compile.', stats.compilation.warnings);
process.exit(1);
}

console.log(chalk.green('Compiled successfully.'));
console.log();

Expand Down