Skip to content

Commit

Permalink
Add a hint for .extra config on unexpected Webpack and Karma config p…
Browse files Browse the repository at this point in the history
…rops

Closes #193
  • Loading branch information
insin committed Dec 12, 2017
1 parent 0f2434e commit 9f57838
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Breaking Changes

- Validation of the configuration object provided by `nwb.config.js` files has been expanded, so previously valid config files may now be invalid:
- Unexpected properties in top-level configuration or in `babel`, `karma`, `npm` and `webpack` configuration (i.e. anything that's not documented in the [Configuration docs](https://github.com/insin/nwb/blob/master/docs/Configuration.md)) are now treated as errors.
- Unexpected properties in top-level configuration or in `babel`, `karma`, `npm` and `webpack` configuration (i.e. anything that's not documented in the [Configuration docs](https://github.com/insin/nwb/blob/master/docs/Configuration.md)) are now treated as errors [[#193](https://github.com/insin/nwb/issues/193)]
- Basic type checking is now performed for all documented configuration properties.
- After upgrading, run `nwb check-config` to check your configuration file.
- Updated to [UglifyJSPlugin 1.x](https://github.com/webpack-contrib/uglifyjs-webpack-plugin#readme), which supports ES2015 syntax and adds options to enable filesystem caching and use multiple processes to improve build speed, which nwb enables by default [[#412](https://github.com/insin/nwb/issues/412)]
Expand Down
3 changes: 2 additions & 1 deletion src/config/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export function processKarmaConfig({report, userConfig}) {
'karma',
unexpectedProps.join(', '),
`Unexpected prop${s(unexpectedProps.length)} in ${chalk.cyan('karma')} config - ` +
'see https://github.com/insin/nwb/blob/master/docs/Configuration.md#karma-configuration for supported config'
'see https://github.com/insin/nwb/blob/master/docs/Configuration.md#karma-configuration for supported config.' +
`If you were trying to add extra Karma config, try putting it in ${chalk.cyan('karma.extra')} instead`
)
}

Expand Down
3 changes: 2 additions & 1 deletion src/config/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export function processWebpackConfig({pluginConfig, report, userConfig}) {
'webpack',
unexpectedProps.join(', '),
`Unexpected prop${s(unexpectedProps.length)} in ${chalk.cyan('webpack')} config - ` +
'see https://github.com/insin/nwb/blob/master/docs/Configuration.md#webpack-configuration for supported config'
'see https://github.com/insin/nwb/blob/master/docs/Configuration.md#webpack-configuration for supported config. ' +
`If you were trying to add extra Webpack config, try putting it in ${chalk.cyan('webpack.extra')} instead`
)
}

Expand Down

0 comments on commit 9f57838

Please sign in to comment.