diff --git a/CHANGES.md b/CHANGES.md index 3f8fc8b2..9f649527 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -264,2096 +264,9 @@ - webpack-merge: v4.1.4 → [v4.2.2](https://github.com/survivejs/webpack-merge/blob/master/CHANGELOG.md#422--2019-08-27) - whatwg-fetch: v2.0.4 → [v3.0.0](https://github.com/github/fetch/releases/tag/v3.0.0) -# 0.23.0 / 2018-08-03 +--- -## Breaking Changes - -- Updated Inferno config for Inferno 5 - `inferno-*` packages (such as `inferno-compat`) work again with Webpack 4 [[#440](https://github.com/insin/nwb/issues/440)] - -## Added - -- Added `prepublishOnly` to react-component and web-module project package.json scripts, which invokes `npm run build` prior to publishing [[#436](https://github.com/insin/nwb/issues/436)] [[hanford][hanford]] -- Added [`npm.umd.entry` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#entry-string) to specify a different entry point for the UMD build in npm module projects. Currently, the UMD build requires an entry point which *must* have a `default` export [[#411](https://github.com/insin/nwb/issues/411)] - -## Fixed - -- Always add `CopyPlugin` when [`webpack.copy` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#copy-array--object) is provided [[#431](https://github.com/insin/nwb/issues/431)] -- Remove use of object destructuring from render shims - fixes output of quick build commands in IE11 [[#453](https://github.com/insin/nwb/issues/453)] - -## Dependencies - -- autoprefixer: v8.1.0 → [v9.0.2](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md#902) -- babel-core: v6.26.0 → [v6.26.3](https://github.com/babel/babel/releases/tag/v6.26.3) -- babel-loader: v7.1.4 → [v7.1.5](https://github.com/babel/babel-loader/releases/tag/v7.1.5) -- babel-plugin-inferno: v4.0.0 → [v5.0.1](https://github.com/infernojs/babel-plugin-inferno/releases) -- babel-plugin-istanbul: v4.1.5 → [v4.1.6](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.5...v4.1.6) -- babel-plugin-transform-decorators-legacy: v1.3.4 → [v1.3.5](https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy/releases/tag/v1.3.5) -- chalk: v2.3.2 → [v2.4.1](https://github.com/chalk/chalk/compare/v2.3.0...v2.4.1) -- copy-template-dir: v1.3.0 → [v1.4.0](https://github.com/yoshuawuyts/copy-template-dir/releases/tag/v1.4.0) -- copy-webpack-plugin: v4.5.1 → [v4.5.2](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md#452-2018-06-26) -- css-loader: v0.28.10 → [v1.0.0](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md#100-2018-07-06) -- detect-port: v1.2.2 → [v1.2.3](https://github.com/node-modules/detect-port/releases) -- filesize: v3.6.0 → [v3.6.1](https://github.com/avoidwork/filesize.js/compare/3.6.0...3.6.1) -- fs-extra: v6.0.0 → [v7.0.0](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md#700--2018-07-16) -- gzip-size: v4.1.0 → [v5.0.0](https://github.com/sindresorhus/gzip-size/compare/v4.1.0...v5.0.0) - dropped Node.js 4 support -- html-webpack-plugin: v3.0.6 → [v3.2.0](https://github.com/jantimon/html-webpack-plugin/blob/master/CHANGELOG.md#320-2018-04-03) -- inquirer: v5.1.0 → [v6.0.0](https://github.com/SBoudrias/Inquirer.js/releases) -- karma: v2.0.0 → [v2.0.5](https://github.com/karma-runner/karma/releases) -- karma-coverage: v1.1.1 → [v1.1.2](https://github.com/karma-runner/karma-coverage/blob/master/CHANGELOG.md#112-2018-05-03) -- karma-webpack: v2.0.13 → [v3.0.0](https://github.com/webpack-contrib/karma-webpack/blob/master/CHANGELOG.md#300-2018-03-19) -- mini-css-extract-plugin v0.2.0 → [v0.4.1](https://github.com/webpack-contrib/mini-css-extract-plugin/releases) -- mocha: v5.0.4 → [v5.2.0](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#520--2018-05-18) -- opn: v5.2.0 → [v5.3.0](https://github.com/sindresorhus/opn/compare/v5.2.0...v5.3.0) -- ora: v2.0.0 → [v3.0.0](https://github.com/sindresorhus/ora/compare/v2.0.0...v3.0.0) -- postcss-loader: v2.1.1 → [v2.1.6](https://github.com/postcss/postcss-loader/blob/master/CHANGELOG.md#216-2018-07-10) -- resolve: v1.5.0 → [v1.8.1](https://github.com/browserify/resolve/compare/v1.5.0...v1.8.1) -- run-series: v1.1.6 → [v1.1.8](https://github.com/feross/run-series/compare/v1.1.6...v1.1.8) -- style-loader: v0.20.2 → [v0.21.0](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md#0210-2018-04-18) -- uglifyjs-webpack-plugin: v1.2.3 → [v1.2.7](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/blob/master/CHANGELOG.md#127-2018-06-25) -- webpack: v4.1.1 → [v4.16.4](https://github.com/webpack/webpack/releases) -- webpack-dev-middleware: v3.0.1 → [v3.1.3](https://github.com/webpack/webpack-dev-middleware/releases) -- webpack-dev-server: v3.1.1 → [v3.1.5](https://github.com/webpack/webpack-dev-server/releases) -- webpack-hot-middleware: v2.21.2 → [v2.22.3](https://github.com/glenjamin/webpack-hot-middleware/compare/v2.21.2...v2.22.3) -- webpack-merge: v4.1.2 → [v4.1.4](https://github.com/survivejs/webpack-merge/blob/master/CHANGELOG.md#414--2018-08-01) -- whatwg-fetch: v2.0.3 → [v2.0.4](https://github.com/github/fetch/releases/tag/v2.0.4) - -## Docs - -- Added [instructions for debugging in VS Code](https://github.com/insin/nwb/blob/master/docs/FAQ.md#how-can-i-debug-using-vs-code-when-running-an-app-with-nwb) to the FAQ [[#445](https://github.com/insin/nwb/issues/445)] -- Replaced references to "ES6" with plain old "ES" - -# 0.22.0 / 2018-03-13 - -## Breaking Changes - -- Node.js 4 is no longer supported; Node.js 6.11.5 is now the minimum required version, as per Webpack 4 [[#400](https://github.com/insin/nwb/issues/400)] -- Updated to Webpack 4 - if you were customising your build with `nwb.config.js`, some of the nwb config you depended on may have changed, and the options Webpack accepts may have changed [[#409](https://github.com/insin/nwb/issues/409)] - - Webpack's new `mode` option is now set to activate Webpack 4's new defaults, which removes the need for a bunch of manual configuration nwb was doing: - - `ModuleConcatenationPlugin` is now automatically enabled in `production` mode instead of being explicitly configured, so nwb's `webpack.hoisting` config has been removed. - - `NamedModulesPlugin` is now automatically used in `development` mode instead of being explicitly configured. - - Development UMD builds for modules now use `production` mode with minimization disabled, as the new `development` mode defaults are unsuitable for code which will be published to npm. - - Webpack's `optimization` options are now used for certain pieces of configuration: - - `optimization.noEmitOnErrors` is used instead of `NoEmitOnErrorsPlugin` to prevent emission of assets when using Hot Module Replacement. - - UglifyJS is now configured via `optimization.minimize`/`optimization.minimizer` instead of just adding `UglifyJsPlugin` directly to `plugins`. - - `CommonsChunkPlugin` has been removed in Webpack 4 - `optimization.runtimeChunk` is now configured to create a `runtime` chunk (which replaces the old `manifest` chunk) and `optimization.splitChunks` is configured to create a `vendor` bundle. - - Replaced used of `ExtractTextPlugin` with [`MiniCssExtractPlugin`](https://github.com/webpack-contrib/mini-css-extract-plugin): - - Separate CSS files are now created and loaded on-demand for code splits. - - Replaced `webpack.extractText` config with [`webpack.extractCSS` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#extractcss-object--boolean) - this is not backwards-compatible, as plugin options differ. - - Webpack's default `performance` option size warnings have been disabled (for now). -- Updated Inferno config for Inferno 4 - see the [Inferno v4 migration guide](https://github.com/infernojs/inferno/blob/master/docs/v4-migration.md) for breaking changes [[#429](https://github.com/insin/nwb/issues/429)] - - `nwb new inferno-app` now asks if you want to install `inferno-compat` as it's no longer a single dependency, defaulting to not installing it. -- `nwb new preact-app` now asks if you want to install `preact-compat`, defaulting to not installing it. -- Updated to Mocha 5, which dropped support for IE9 and IE10 and fixed some false positives. -- Removed support for deprecated `webpack.compat.enzyme`, `webpack.compat.sinon` and `webpack.style = 'old'` config. - -## Known Issues - -- Inferno is currently publishing `.mjs` files to npm, [which is breaking `inferno-*` packages with Webpack 4](https://github.com/infernojs/inferno/issues/1296), so e.g. `inferno-compat` won't work if you want to reuse React components. - -## Added - -- Added an `-f/--force` flag to `nwb new` to accept defaults and skip questions. - -## Changed - -- The dev server's fallback `index.html` serving can now be configured with dot arguments - e.g. pass `--fallback.disableDotRule` if you need to use dots in your path when using the HTML5 History API. -- `--no-polyfill` can now be used to disable default polyfills for app projects as well as quick commands. - -## Dependencies - -- autoprefixer: v7.2.5 → [v8.1.0](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md#810) -- babel-loader: v7.1.2 → [v7.1.4](https://github.com/babel/babel-loader/releases) -- babel-plugin-inferno: v3.3.1 → [v4.0.0](https://github.com/infernojs/babel-plugin-inferno/releases) -- case-sensitive-paths-webpack-plugin: v2.1.1 → [v2.1.2](https://github.com/Urthen/case-sensitive-paths-webpack-plugin/blob/master/CHANGELOG.md#v212) -- chalk: v2.3.0 → [v2.3.2](https://github.com/chalk/chalk/compare/v2.3.0...v2.3.2) -- copy-webpack-plugin: v4.3.1 → [v4.5.1](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md#451-2018-03-09) -- cross-spawn: v6.0.4 → [v6.0.5](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md#605-2018-03-02) -- css-loader: v0.28.9 → [v0.28.10](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md#02810-2018-02-22) -- extract-text-webpack-plugin v3.0.0 → [mini-css-extract-plugin v0.2.0](https://github.com/webpack-contrib/mini-css-extract-plugin) -- file-loader: v1.1.6 → [v1.1.11](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md#1111-2018-03-01) -- filesize: v3.5.11 → [v3.6.0](https://github.com/avoidwork/filesize.js/compare/3.5.11...3.6.0) -- html-webpack-plugin: v2.30.1 → [v3.0.6](https://github.com/jantimon/html-webpack-plugin/blob/master/CHANGELOG.md#306-2018-03-06) -- inquirer: v3.3.0 → [v5.1.0](https://github.com/SBoudrias/Inquirer.js/releases) - latest version requires Node.js 6 -- karma-webpack: v2.0.9 → [v2.0.13](https://github.com/webpack-contrib/karma-webpack/blob/master/CHANGELOG.md#2013-2018-02-27) -- mocha: v4.1.0 → [v5.0.4](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#504--2018-03-07) -- npm-install-webpack-plugin v4.0.5 → @insin/npm-install-webpack-plugin v5.0.0 - Webpack 4 compatibility -- ora: v1.3.0 → [v2.0.0](https://github.com/sindresorhus/ora/releases/tag/v2.0.0) -- postcss-loader: v2.0.10 → [v2.1.1](https://github.com/postcss/postcss-loader/blob/master/CHANGELOG.md#211-2018-02-26) -- style-loader: v0.20.1 → [v0.20.2](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md#0202-2018-02-15) - skip empty `url()`s -- uglifyjs-webpack-plugin: v1.1.8 → [v1.2.3](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/blob/master/CHANGELOG.md#123-2018-03-10) -- url-loader: v0.6.2 → [v1.0.1](https://github.com/webpack-contrib/url-loader/blob/master/CHANGELOG.md#101-2018-03-03) -- webpack: v3.10.0 → [v4.1.1](https://github.com/webpack/webpack/releases) -- webpack-dev-middleware: v1.12.2 → [v3.0.1](https://github.com/webpack/webpack-dev-middleware/releases) -- webpack-dev-server: v2.9.7 → [v3.1.1](https://github.com/webpack/webpack-dev-server/releases) -- webpack-hot-middleware: v2.21.0 → [v2.21.2](https://github.com/glenjamin/webpack-hot-middleware/compare/v2.21.0...v2.21.2) -- webpack-merge: v4.1.1 → [v4.1.2](https://github.com/survivejs/webpack-merge/compare/v4.1.1...v4.1.2) - -## Internal - -- Updated `StatusPlugin` and `InlineRuntimePlugin` to use the Use the new Webpack 4 `.hooks` plugin API. - -## Docs - -- Fixed [`publicPath` docs](https://github.com/insin/nwb/blob/master/docs/Configuration.md#publicpath-string), as Webpack's `output.publicPath` config can't be `null` [[#432](https://github.com/insin/nwb/issues/432)] [[stephenwf][stephenwf]] - -# 0.21.5 / 2018-02-02 - -## Dependencies - -- cross-spawn: v6.0.3 → [v6.0.4](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md#604-2018-01-31) - -# 0.21.4 / 2018-01-30 - -## Fixed - -- Fixed validation of `webpack.compat` locale properties [[#425](https://github.com/insin/nwb/issues/425)] -- Fixed false negative when checking if the port is available when `devServer.port` is specified as a `String` [[#423](https://github.com/insin/nwb/issues/423)] - -## Dependencies - -- uglifyjs-webpack-plugin: v1.1.6 → [v1.1.8](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/blob/master/CHANGELOG.md#118-2018-01-29) - reduce memory consumption - -# 0.21.3 / 2018-01-28 - -## Changed - -- `port` config in [`devServer` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#devserver-object) will now be used if configured [[#423](https://github.com/insin/nwb/issues/423)] - -## Dependencies - -- cross-spawn: v5.1.0 → [v6.0.3](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md#603-2018-01-23) -- css-loader: v0.28.7 → [v0.28.9](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md#0289-2018-01-17) -- style-loader: v0.19.1 → [v0.20.1](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md#0201-2018-01-26) - -# 0.21.2 / 2018-01-17 - -## Fixed - -- Fixed validation of `babel.env` config [[#420](https://github.com/insin/nwb/issues/420)] [[ngyikp][ngyikp]] - -## Dependencies - -- autoprefixer: v7.2.4 → [v7.2.5](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md#725) -- opn: v5.1.0 → [v5.2.0](https://github.com/sindresorhus/opn/compare/v5.1.0...v5.2.0) -- semver: v5.4.1 → [v5.5.0](https://github.com/npm/node-semver/compare/v5.4.1...v5.5.0) - -# 0.21.1 / 2018-01-12 - -## Fixed - -- Fixed validation of `webpack.extractText = false` config, which disables extraction of imported stylesheets into `.css` files [[#418](https://github.com/insin/nwb/issues/418)] - -## Dependencies - -- postcss-loader: v2.0.9 → [v2.0.10](https://github.com/postcss/postcss-loader/blob/master/CHANGELOG.md#2010-2018-01-03) -- uglifyjs-webpack-plugin: v1.1.5 → [v1.1.6](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/releases/tag/v1.1.6) - -# 0.21.0 / 2018-01-03 - -## 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 [[#136](https://github.com/insin/nwb/issues/136)] - - 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)] - - Review any custom [`webpack.uglify` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#uglify-object--false) you have against the new version's [options documentation](https://github.com/webpack-contrib/uglifyjs-webpack-plugin#options) - options for UglifyJS itself must now be passed as an `uglifyOptions` object and some of UglifyJS' default options have changed. -- Node.js 4.8.0 is now the minimum required version, based on the `engines` config of nwb's dependencies. - -## `nwb.config.js` Config Changes - -- Deprecated the `webpack.compat.sinon` flag for Sinon 1.x compatibility settings, as subsequent major versions since July 2017 support Webpack out of the box. - -## Fixed - -- Fixed testing React component/library and web module projects when using [export extensions](http://babeljs.io/docs/plugins/transform-export-extensions/) - the Babel stage preset wasn't being defaulted to preset-stage-1, which includes the export extensions plugin [[#364](https://github.com/insin/nwb/issues/364)] - -## Added - -- Added an [`--open` flag](https://github.com/insin/nwb/blob/master/docs/Commands.md#options) to open the app in your default browser or in a named browser (e.g. `--open="Google Chrome"`) after starting a Webpack dev server [[#334](https://github.com/insin/nwb/issues/334)] -- You can now provide a [`babel.config()` function](https://github.com/insin/nwb/blob/master/docs/Configuration.md#config-function) which will be given the generated Babel config to do whatever it wants with. -- You can now provide a [`karma.config()` function](https://github.com/insin/nwb/blob/master/docs/Configuration.md#config-function-2) which will be given the generated Karma config to do whatever it wants with [[#408](https://github.com/insin/nwb/issues/408)] - -## Changed - -- Simplified configuration of locales in [`webpack.compat` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#compat-object) - -## Dependencies - -- autoprefixer: v7.1.6 → [v7.2.4](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md#724) -- babel-plugin-inferno: v3.3.0 → [v3.3.1](https://github.com/infernojs/babel-plugin-inferno/releases) -- copy-webpack-plugin: v4.2.1 → [v4.3.1](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md#431-2017-12-22) -- file-loader: v1.1.5 → [v1.1.6](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md#116-2017-12-16) -- gzip-size: v4.0.0 → [v4.1.0](https://github.com/sindresorhus/gzip-size/compare/v4.0.0...v4.1.0) -- karma: v1.7.1 → [v2.0.0](https://github.com/karma-runner/karma/releases/tag/v2.0.0) -- karma-webpack: v2.0.6 → [v2.0.9](https://github.com/webpack-contrib/karma-webpack/blob/master/CHANGELOG.md#209-2017-12-14) -- mocha: v4.0.1 → [v4.1.0](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#410--2017-12-28) -- postcss-loader: v2.0.8 → [v2.0.9](https://github.com/postcss/postcss-loader/blob/master/CHANGELOG.md#209-2017-11-24) -- style-loader: v0.19.0 → [v0.19.1](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md#0191-2017-12-14) -- webpack: v3.8.1 → [v3.10.0](https://github.com/webpack/webpack/releases) -- webpack-dev-middleware: v1.12.0 → [v1.12.2](https://github.com/webpack/webpack-dev-middleware/releases) -- webpack-dev-server: v2.9.4 → [v2.9.7](https://github.com/webpack/webpack-dev-server/releases) -- webpack-hot-middleware: v2.20.0 → [v2.21.0](https://github.com/glenjamin/webpack-hot-middleware/compare/v2.20.0...v2.21.0) - -## Docs - -- Added missing docs for [`webpack.copy` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#copy-array--object) -- Added more headings to the [Commands docs](https://github.com/insin/nwb/blob/master/docs/Commands.md#commands) to make them easier to browse, and to make feature flags such as `--copy-files` for component builds more visible [[#407](https://github.com/insin/nwb/issues/407)] - -# 0.20.0 / 2017-11-18 - -## Breaking Changes - -- Updated UMD build config to [export the `default` export of the entry point](https://webpack.js.org/configuration/output/#output-libraryexport), rather than an ES modules interop object which looks something like `{__esModule: true, default: Getter}`, which was unintended behaviour. This will break any existing usage of UMD builds which depended on manually accessing the unintended `default` property [[#402](https://github.com/insin/nwb/issues/402)] -- Updated to Mocha 4, which comes with [a number of breaking changes](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#boom-breaking-changes). These are mostly related to dropping support for older versions of Node.js and non-ES5-compliant browsers. - -## Fixed - -- Bump the default React peerDependency version for react-component projects to `16.x` - fixes creating components with npm 2. - -## Dependencies - -- copy-webpack-plugin: v4.2.0 → [v4.2.1](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md#421-2017-11-17) -- detect-port: v1.2.1 → [v1.2.2](https://github.com/node-modules/detect-port/releases) -- karma-webpack: v2.0.5 → [v2.0.6](https://github.com/webpack-contrib/karma-webpack/blob/master/CHANGELOG.md#206-2017-11-10) -- mocha: v3.4.2 → [v4.0.1](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#401--2017-10-05) - dropped support for old versions of Node.js and non-ES5-compliant browsers - -## Documentation - -- Documented `--unsafe-perm` workaround for PhantomJS' postinstall step failing on some OSes when installing globally with npm 5 [[#383](https://github.com/insin/nwb/issues/383)] - -# 0.19.2 / 2017-11-09 - -## Fixed - -- Backed out use of `preact/debug` in favour of `preact/devtools`, as the debug module tries to override the preact module's render export, which fails due to Webpack enforcing the read-only nature of ES module exports. - -# 0.19.1 / 2017-11-04 - -## `nwb.config.js` Config Changes - -- Deprecated the `webpack.compat.enzyme` flag for Enzyme v2 compatibility settings. Upgrade to Enzyme v3 when you can, which supports React all the way back to v0.13. - - [An example of configuring Enzyme v3](https://github.com/insin/nwb/blob/master/docs/Testing.md#configuring-testing-libraries) has been added to the [testing docs](https://github.com/insin/nwb/blob/master/docs/Testing.md#testing). - -## Fixed - -- Added `'createClass'` and `'createReactClass'` to the factory function names [React Transform](https://github.com/gaearon/babel-plugin-react-transform) looks for, so React component hot reloading will work for apps using [`create-react-class`](https://www.npmjs.com/package/create-react-class) imported as one of those names. - -## Changed - -- nwb is now also tested against Node 8 now that it's the Long Term Support version. -- Reverted the Webpack settings change for `webpack.compat.enzyme` config in v0.19.0, as it only applied while the version numbers of published React packages were out of sync. The compatibility settings assume Enzyme v2 and React >= v15.5. -- `style-loader`'s new `hmr` option is set to `false` when creating builds to prevent inclusion of its HMR code. - -## Dependencies - -- autoprefixer: v7.1.4 → [v7.1.6](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md#716) -- babel-plugin-inferno: v3.2.0 → [v3.3.0](https://github.com/infernojs/babel-plugin-inferno/releases) -- babel-plugin-transform-react-remove-prop-types: v0.4.8 → [v0.4.10](https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types/releases) -- babel-preset-env: v1.6.0 → v1.7.0 -- chalk: v2.1.0 → [v2.3.0](https://github.com/chalk/chalk/compare/v2.1.0...v2.3.0) -- copy-webpack-plugin: v4.1.0 → [v4.2.0](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md#420-2017-10-19) -- extract-text-webpack-plugin: v3.0.0 → [v3.0.2](https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/master/CHANGELOG.md#302-2017-10-25) -- file-loader: v1.1.4 → [v1.1.5](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md#115-2017-10-05) -- filesize: v3.5.10 → [v3.5.11](https://github.com/avoidwork/filesize.js/compare/3.5.10...3.5.11) -- karma-mocha-reporter: v2.2.4 → [v2.2.5](https://github.com/litixsoft/karma-mocha-reporter/blob/master/CHANGELOG.md#225-2017-10-17) -- karma-webpack: v2.0.4 → [v2.0.5](https://github.com/webpack-contrib/karma-webpack/blob/master/CHANGELOG.md#205-2017-10-08) -- phantomjs-prebuilt: v2.1.15 → v2.1.16 -- postcss-loader: v2.0.6 → [v2.0.8](https://github.com/postcss/postcss-loader/blob/master/CHANGELOG.md#208-2017-10-14) -- resolve: v1.4.0 → [v1.5.0](https://github.com/browserify/resolve/compare/v1.4.0...v1.5.0) -- style-loader: v0.18.2 → [v0.19.0](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md#0190-2017-10-03) -- url-loader: v0.5.9 → [v0.6.2](https://github.com/webpack-contrib/url-loader/blob/master/CHANGELOG.md#062-2017-10-04) -- webpack: v3.6.0 → [v3.8.1](https://github.com/webpack/webpack/releases) -- webpack-dev-server: v2.9.1 → [v2.9.4](https://github.com/webpack/webpack-dev-server/releases) -- webpack-hot-middleware: v2.19.1 → [v2.20.0](https://github.com/glenjamin/webpack-hot-middleware/compare/v2.19.1...v2.20.0) -- webpack-merge: v4.1.0 → [v4.1.1](https://github.com/survivejs/webpack-merge/blob/master/CHANGELOG.md#411--2017-11-01) - -# 0.19.0 / 2017-10-02 - -## Breaking Changes - -- Removed hooking of React, Preact and Inferno `render()` functions in quick commands, as this won't work with ES modules builds (which are used by default in Webpack v3). This affected the current version of Preact at the time of writing. - - If you're manually using `render()` with quick commands, you must now handle providing the target DOM node too - `document.getElementById('app')` is available in the default HTML template. - -## Added - -- Added [`babel.env` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#env-object) to pass additional [options for `babel-preset-env`](https://github.com/babel/babel-preset-env#options). -- Added additional Enzyme [`webpack.compat`](https://github.com/insin/nwb/blob/master/docs/Configuration.md#compat-object) for recent versions of React 15. - -## Changed - -- Now using `babel-preset-env` instead of deprecated `babel-preset-es201X` presets [[#375](https://github.com/insin/nwb/issues/375)] -- Use `beautify: true` for `webpack.debug` output so code split bundles are readable. - -## Dependencies - -- autoprefixer: v7.1.2 → [v7.1.4](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md#714) -- babel-cli: v6.24.1 → [v6.26.0][babel6260] -- babel-core: v6.24.1 → [v6.26.0][babel6260] -- babel-loader: v7.1.1 → [v7.1.2](https://github.com/babel/babel-loader/releases/tag/v7.1.2) -- babel-plugin-istanbul: v4.1.4 → v4.1.5 -- babel-plugin-react-transform: v2.0.2 → [v3.0.0](https://github.com/gaearon/babel-plugin-react-transform/releases) - add `React.PureComponent` to the list of default super classes -- babel-plugin-transform-react-remove-prop-types: v0.4.6 → [v0.4.8](https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types/releases) -- babel-polyfill: v6.23.0 → [v6.26.0][babel6260] -- babel-runtime: v6.25.0 → [v6.26.0][babel6260] -- chalk: v2.0.1 → [v2.1.0](https://github.com/chalk/chalk/compare/v2.0.1...v2.1.0) -- copy-webpack-plugin: v4.0.1 → [v4.1.0](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md#410-2017-09-29) -- css-loader: v0.28.4 → [v0.28.7](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md#0287-2017-08-30) -- file-loader: v0.11.2 → [v1.1.4](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md#114-2017-09-30) -- gzip-size: v3.0.0 → v4.0.0 - async interface now uses Promises -- html-webpack-plugin: v2.29.0 → [v2.30.1](https://github.com/jantimon/html-webpack-plugin/blob/master/CHANGELOG.md#v2301) -- inquirer: v3.2.1 → [v3.3.0](https://github.com/SBoudrias/Inquirer.js/releases) -- karma-mocha-reporter: v2.2.3 → [v2.2.4](https://github.com/litixsoft/karma-mocha-reporter/blob/master/CHANGELOG.md#224-2017-08-24) -- karma: v1.7.0 → [v1.7.1](https://github.com/karma-runner/karma/releases/tag/1.7.1) -- mocha: v3.4.2 → [v3.5.3](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#353--2017-09-11) -- phantomjs-prebuilt: v2.1.14 → v2.1.15 - fix security issues with dependencies -- webpack-dev-middleware: v1.11.0 → [v1.12.0](https://github.com/webpack/webpack-dev-middleware/releases/tag/v1.12.0) -- webpack-dev-server: v2.6.1 → [v2.9.1](https://github.com/webpack/webpack-dev-server/releases) -- webpack-hot-middleware: v2.18.2 → [v2.19.0](https://github.com/glenjamin/webpack-hot-middleware/compare/v2.18.2...v2.19.0) -- webpack: v3.4.1 → [v3.6.0](https://github.com/webpack/webpack/releases) - -[babel6260]: https://github.com/babel/babel/blob/master/CHANGELOG.md#6260-2017-08-16 - -# 0.18.10 / 2017-07-27 - -## Fixed - -- Fix dev server HMR for people running on different hosts or a different localhost port [[#356](https://github.com/insin/nwb/issues/356)] [[DethAriel][DethAriel]] - -## Dependencies - -- babel-runtime: v6.23.0 → v6.25.0 -- resolve: v1.3.3 → [v1.4.0](https://github.com/browserify/resolve/compare/v1.3.3...v1.4.0) -- webpack: v3.4.0 → [v3.4.1](https://github.com/webpack/webpack/releases/tag/v3.4.1) - -# 0.18.9 / 2017-07-26 - -## Changed - -- Now using preact/debug instead of preact/devtools in quick Preact commands and the Preact project skeleton - requires Preact >= 8.2.0 - -## Dependencies - -- inquirer: v3.2.0 → [v3.2.1](https://github.com/SBoudrias/Inquirer.js/releases/tag/v3.2.1) -- promise: v8.0.0 → v8.0.1 -- webpack: v3.2.0 → [v3.4.0](https://github.com/webpack/webpack/releases) - bug fixes; now watches for missing directories being added; perf improvements -- webpack-dev-server: v2.5.1 → [v2.6.1](https://github.com/webpack/webpack-dev-server/releases) - -# 0.18.8 / 2017-07-16 - -## Dependencies - -- promise: v8.0.0 → v8.0.1 -- webpack: v3.2.0 → [v3.3.0](https://github.com/webpack/webpack/releases/tag/v3.3.0) - bug fixes; now watches for missing directories being added - -# 0.18.7 / 2017-07-12 - -## Changed - -- You can now set [`webpack.extractText` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#extracttext-object--boolean) to `false` to disable extraction of stylesheets in builds [[#343](https://github.com/insin/nwb/issues/343)] - -## Dependencies - -- extract-text-webpack-plugin: v3.0.0-rc.2 → v3.0.0 -- webpack: v3.1.0 → [v3.2.0](https://github.com/webpack/webpack/releases/tag/v3.2.0) - bug fixes - -## Documentation - -- Documented default [`webpack.extractText` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#extracttext-object--boolean). - -# 0.18.6 / 2017-07-10 - -## Dependencies - -- extract-text-webpack-plugin: v3.0.0-rc.1 → v3.0.0-rc.2 - fix module sorting type error -- inquirer: v3.1.1 → [v3.2.0](https://github.com/SBoudrias/Inquirer.js/releases/tag/v3.2.0) - -# 0.18.5 / 2017-07-09 - -## Dependencies - -- extract-text-webpack-plugin: v3.0.0-beta.3 → v3.0.0-rc.1 -- karma-webpack: v2.0.3 → [v2.0.4](https://github.com/webpack-contrib/karma-webpack/blob/master/CHANGELOG.md#204-2017-07-07) - Webpack 3 support -- webpack-dev-server: v2.5.0 → [v2.5.1](https://github.com/webpack/webpack-dev-server/releases/tag/v2.5.1) - Webpack 3 support - -# 0.18.4 / 2017-07-07 - -## Fixed - -- Fixed use of `@import` in CSS by adding `ident` back to `postcss-loader` config [[#311](https://github.com/insin/nwb/issues/311)] -- Fixed config validation error being thrown when using `webpack.styles` config for custom preprocessor plugin rules [[#342](https://github.com/insin/nwb/issues/342)] -- Fixed display of valid properties when an invalid property is used when configuring a custom `webpack.styles` rule. - -## Added - -- Added [`webpack.debug` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#debug-boolean) to trigger creation of a more debuggable production build [[#336](https://github.com/insin/nwb/issues/336)] - - The recommended way to use this is via a [config argument](https://github.com/insin/nwb/blob/master/docs/Configuration.md#configuration-via-arguments): - - ```sh - npm run build -- --webpack.debug - ``` - -- Added support for the following arguments when building a React component's demo: - - `--title` - set the generated demo `index.html`'s `
` tag, so **your HTML template *must* have a `` tag**. - - **If you do any post-build processing on generated files it might need to be updated**, as production app builds will now generate files as `[name].[hash].[ext]` instead of `[name].[ext]`. -- **Dropped support for the `.jsx` extension** - - [It's dead, Jim](https://github.com/facebookincubator/create-react-app/issues/87#issuecomment-234627904). - - > You can use [`webpack.loaders` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#loaders-object) to set `/\.jsx?$/` as `babel-loader`'s `test` config and [`webpack.extra config`](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#extra-object) to add `.jsx` back to the `resolve.extensions` list if you're using `.jsx` files and can't reasonably migrate away. -- **Dropped `build-module` and `build-umd/clean-umd`commands** - - These were a confusing middle layer which split the implementation of building a React component or browser-focused npm module in two. They both required a config file to provide a project `type` for nwb to figure out what to do. - - They've been **replaced with `build-react-component` and `build-web-module` commands**, which are now used in `package.json` `scripts` in the corresponding project skeletons. - - As a result **having a config file is now optional for all project types**. If you don't need configuration, you can delete the `nwb.config.js` file created as a convenience by project skeletons. - - A config file is now only required if you want to use the generic `build`, `clean` and `serve` commands. -- **Changed ES6 module build directory from `es6/` to `es/`** - - Upgrade steps: - - - Replace `"es6/index.js"` with `"es/index.js"` in `package.json` `"jsnext:main"` config - - Also add `"module": "es/index.js"`, as this is part of [a proposal for native module support](https://github.com/dherman/defense-of-dot-js/blob/master/proposal.md) which is being supported by multiple bundlers. - - Replace `"es6"` with `"es"` in `package.json` `files` config - -- **Dropped `webpack.vendorBundle` config in favour of a `--no-vendor` flag** - - Making this feature toggle a command line argument makes it easier to try, and to combine with other feature toggles like `--preact`. - - Tweak your `package.json` `"build"` script instead if you were using `webpack.vendorBundle: false` config: - - ```json - { - "scripts": { - "build": "nwb build-react-app --no-vendor" - } - } - ``` - -**`nwb.config.js` Config Format Changes:** - -- **`build` config is deprecated in favour of new [`npm` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#npm-object)**, which is a slightly different format. - - nwb will adapt any `build` config it finds for the current build and log out the equivalent `npm` config. - - ``` - // < v0.12 // v0.12 - module.exports = { module.exports = { - build: { => npm: { - jsNext: true, esModules: true, - umd: true, => umd: { - global: 'MyComponent', global: 'MyComponent', - externals: {'react': 'React'} externals: {'react': 'React'} - } } - } } - } - ``` - ``` - // < v0.12 // v0.12 - simple UMD config without externals - module.exports = { module.exports = { - build: { => npm: { - jsNext: true, esModules: true, - umd: true, => umd: 'myLib' - global: 'MyLib' } - } } - } - ``` - -- **The Babel [runtime transform](https://babeljs.io/docs/plugins/transform-runtime/) is now configured using new [`babel.runtime` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#runtime-string--boolean)** instead of Babel 5's `optional` config. - - **The runtime transform is now partially-enabled by default** to support use of `async`/`await` and generators, so update your configuration accordingly. nwb will adapt `['runtime']` config for the current build by converting it to `true`. - - ``` - // < v0.12 // v0.12 - enabled by default for regenerator - module.exports = { - babel: { - optional: ['runtime'] => // You can remove your config if you were - } // using it for async/await or generators - } - ``` - ``` - // < v0.12 // v0.12 - also import helpers from - module.exports = { module.exports = { - babel: { babel: { - optional: ['runtime'] => runtime: 'helpers' - } } - } } - ``` - -- **[`babel.loose` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#loose-boolean) is now Boolean** instead of Babel 5's string config. - - **[Loose mode](http://www.2ality.com/2015/12/babel6-loose-mode.html) is now enabled by default**, so `loose` config is only used if you need to disable loose mode. - - ``` - // < v0.12 // v0.12 - enabled by default - module.exports = { - babel: { - loose: 'all' => (none) - } - } - ``` - ``` - // < v0.12 - loose mode not used // v0.12 - disabling loose mode - module.exports = { - babel: { - (none) => loose: false - } - } - ``` - -- **`karma.tests` config is deprecated in favour of new [`karma.testContext`](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#testcontext-string) and [`karma.testFiles` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#testfiles-string--arraystring)**, depending on which was being specified. If `karma.tests` is present, nwb will attempt to detect the appropriate new config to use it for, or will otherwise fall back to the new default config. - - ``` - // < v0.12 // v0.12 - using a Webpack context module - module.exports = { module.exports = { - karma: { karma: { - tests: 'tests.webpack.js' => testContext: 'tests.webpack.js' - } } - } } - ``` - ``` - // < v0.12 // v0.12 - custom test file glob - module.exports = { module.exports = { - karma: { karma: { - tests: 'test/**.test.js' => testFiles: 'test/**.test.js' - } } - } } - ``` - -**Developer Experience Improvements:** - -- **Added a `check-config` command which checks your nwb configuration file** for errors and deprecated usage, and provides some usage hints (e.g. where more convenient config is available). - - Run this after upgrading your nwb version and it will tell you what needs to be changed. -- **New user-friendly output for Webpack builds based on [create-react-app](https://github.com/facebookincubator/create-react-app)'s**. - - This provides friendlier error and warning reporting, reports the gzipped size of generated files and uses a persistent console for development server logging. - - **Windows Note:** running a development server will clear the current screen in your console - in Windows the escape codes used to do this have the unfortunate effect of clearing *all* the scrollback history in your current console. - - To avoid this **use the `start` command to spawn a new command window when running the development server in Windows**, e.g.: - - ``` - start npm start - start react run app.js - ``` -- **Apps can now use `fetch`, `async`/`await` and generators out of the box without any configuration.** - - `Promise`, `fetch`, `Object.assign` polyfills and the regenerator runtime are now provided by default. -- You can now **transform destructured imports to cherry-picked imports for specified modules** using new [`babel.cherryPick` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#cherrypick-string--arraystring) [[#141](https://github.com/insin/nwb/issues/141)] -- Case-sensitivity of `require`/`import` paths is now enforced by [`CaseSensitivePathsPlugin`](https://github.com/Urthen/case-sensitive-paths-webpack-plugin), avoiding an easy-to-overlook cause of CI build failure if you don't develop on Linux. -- If the intended dev server port is not available, you will now be prompted to continue with a different, free port. - -**React App Optimisations:** - -- **Production React builds now remove `propTypes` from ES6 class and stateless functional components** (but not from your dependencies) using [react-remove-prop-types](https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types) [[#97](https://github.com/insin/nwb/issues/97)] - -- **Added a [`--preact` flag](https://github.com/insin/nwb/blob/0.12/docs/Commands.md#build-1)** to React app builds to create a [`preact-compat`](https://github.com/developit/preact-compat) build. - - This is an easy way to try [Preact](https://preactjs.com/) with your React apps, resulting in a much smaller bundle if your app is compatible [[#124](https://github.com/insin/nwb/issues/124)] - -**Babel:** - -- **nwb implements its own support for a Babel 6 equivalent of Babel 5's `stage` configuration** to [choose which experimental features are enabled](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#stage-number--false), including defaulting to [Stage 2](https://babeljs.io/docs/plugins/preset-stage-2/). - - For stage 2 and below, **decorators can be use by default**, as nwb will include the [Babel Legacy Decorator transform plugin](https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy). See [the plugin's Best Effort documentation](https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy#best-effort) for differences you will need to take into account if you were using Babel 5 decorators. -- **nwb preserves CommonJS interop for apps and component ES5 builds** using the [`add-module-exports`](https://github.com/59naga/babel-plugin-add-module-exports) plugin. - - This means a `.default`doesn't need to be tagged on when you're using `require()` with Webpack's code-splitting, or when people import your npm modules using `require()` directly. - - Babel 6 removed interop with CommonJS exports, as it allowed you to write broken ES6 code. Kent C. Dodds has [a post about this which is well worth reading](https://medium.com/@kentcdodds/misunderstanding-es6-modules-upgrading-babel-tears-and-a-solution-ad2d5ab93ce0) to understand what *not* to do. -- **[Loose mode](http://www.2ality.com/2015/12/babel6-loose-mode.html) is now enabled by default.** -- **Changed [`babel.loose` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#loose-boolean) to Boolean**. - - This is now only needed if you want to disable loose mode (e.g. in non-production environments to check for ES6 compliance errors in normal mode). -- **Added [`babel.runtime` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#runtime-string--boolean)** to configure the Babel runtime transform, replacing Babel 5's `optional` config. - - This is turned on by default, configured to import the regenerator runtime when `async`/`await` or generators are used. -- **Removed the inline element transform optimisation for React app production builds**, as the Babel 6 version of it currently depends on polyfilling `Symbol`. - -**Karma:** - -- **Changed default testing configuration** to support co-location of tests and a wider range of test file names and locations. This should be backwards-compatible with the previous defaults. - - Test files included by default are now `-test.js`, `.test.js` or `.spec.js` files anywhere underneath a `src/`, `test/` or `tests/` directory. - - Code coverage also ignores all code underneath `test/`, `tests/` or any `__tests__/` directory inside `src/` by default, as well as test files. -- **Added [`karma.browsers` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#browsers-string--arrayplugin)** to customise which browsers tests are run in. - - The plugin to support use of `'Chrome'` in this config is also available by default. -- **Added [`karma.testDirs` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#testdirs-string--arraystring)** to control which directories are excluded from code coverage reporting. -- **[`babel-plugin-istanbul`](https://github.com/istanbuljs/babel-plugin-istanbul) is now used to instrument code for test coverage** instead of `isparta-loader`. - -**Webpack:** - -*Default Loader Config* - -- **Disabled `css-loader`'s use of Autoprefixer** - nwb's PostCSS configuration is now the only source of prefix addition and removal [[#132](https://github.com/insin/nwb/issues/132)] -- All static file loaders now use `url-loader` (which falls back to `file-loader`) to allow you to configure inlining for any group of static files if needed. -- **Changed default `limit` config for all static file loaders to `1`**, effectively disabling inlining by default - if you want resources smaller than a given size to be inlined, configure `limit` using [`webpack.loaders` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#loaders-object). -- Moved handling of `.svg` files from the `fonts` loader to the `graphics` loader. -- Moved handling of `.eot` files to the `fonts` loader and removed the `eot` loader. -- Added a `video` loader for `.mp4'`, `.ogg` and `.webm`. -- Added `.webp` to the `graphics` loader. - -*Default Plugin Config* - -- **Updated default `UglifyJsPlugin` options** to strip comments from output and use the `screw_ie8` setting in every minification step. - -*Configuration* - -- **Added [`webpack.aliases` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#aliases-object)** to set up module resolving aliases, as a convenient alternative to using `webpack.extra.resolve.alias` [[#125](https://github.com/insin/nwb/issues/125)] -- **Added [`webpack.autoprefixer` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#autoprefixer-string--object)** to configure Autoprefixer in nwb's default PostCSS configuration [[#132](https://github.com/insin/nwb/issues/132)] -- **Added [`webpack.publicPath` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#publicpath-string)** to set up or clear the path/URL used for static resources, as a convenient alternative to using `webpack.extra.output.publicPath`. -- **Added [`webpack.uglify` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#uglify-object)** to allow customisation of Webpack `UglifyJsPlugin` options. -- **[`webpack.compat` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#compat-object) now supports `'json-schema': true`** to prevent a transitive [`json-schema`](https://github.com/kriszyp/json-schema) dependency breaking Webpack builds. This usually manifests itself as an `Uncaught Error: define cannot be used indirect` error. -- **Generated `module.noParse` config is now an `Array`**, so any user-provided config for it in `webpack.extra` (which should also be specified as an `Array`) can now be merged into it. - -**npm Build:** - -- When creating a project with an ES6 modules build enabled, a `"module"` property will be added to the project's `package.json` as well as `"jsnext:main"` [[#137](https://github.com/insin/nwb/issues/137)] - - This is the default property Webpack 2 uses to look for an ES6 modules build. -- `build` config is deprecated in favour of new [`npm` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#npm-object). -- **React component builds now wrap `propTypes` for ES6 class and stateless functional components with an environment check** - `if (process.env.NODE_ENV !== 'production')` - so they'll automatically be stripped from the production build in apps which use them. [[#145](https://github.com/insin/nwb/issues/145)] - - `propTypes` will be stripped from the minified UMD build. - - This can be disabled by passing a `--no-proptypes` flag. -- Building a React demo app during a React component build can now be skipped by passing a `--no-demo` flag [[#155](https://github.com/insin/nwb/issues/155)] - -**Other Configuration:** - -- **Fallback index serving for HTML5 History apps is now enabled by default** in the development server. This can be disabled by passing a `--no-fallback` flag. -- **Added [`polyfill` config](https://github.com/insin/nwb/blob/0.12/docs/Configuration.md#polyfill-boolean)** to disable default polyfilling of `Promise` and `fetch` for apps if you don't need it and want to shave a few KB off your build. -- **The dev server port can now be specified via a `PORT` environment variable**. The CLI `--port` takes precedence if both are provided. - -**CLI:** - -- Added a `nwb check-config` command. -- CLI now uses spinners for build commands, with gzipped filesize logging. -- **Reworked build commands for React components and npm modules** to remove a needless middle layer and add specific build commands for these project types. -- **Removed the `-g, --global` argument for enabling a UMD build** when creating a React component or web module project, in favour of passing a name to the `--umd` argument instead. -- **Removed the `--info` flag for showing webpack output**, as this is now handled in a more developer-friendly manner. - -**Starter Projects:** - -- The react-app project skeleton now includes examples of importing CSS and images. -- Required `` tags in HTML templates are now all first thing in `
`. -- Added `shrink-to-fit=no` to the `viewport` `` tag in HTML templates for Safari. - -**Dependencies:** - -- autoprefixer: v6.3.6 → [v6.4.0](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md#640) -- babel\* v5 → babel\* v6 -- [babel-plugin-istanbul](https://github.com/istanbuljs/babel-plugin-istanbul/): v2.0.0 -- [babel-plugin-lodash](https://github.com/lodash/babel-plugin-lodash): v3.2.8 -- [babel-plugin-transform-react-remove-prop-types](https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types): v0.2.9 -- [case-sensitive-paths-webpack-plugin](https://github.com/Urthen/case-sensitive-paths-webpack-plugin): v1.1.3 -- connect-history-api-fallback: v1.2.0 → [v1.3.0](https://github.com/bripkens/connect-history-api-fallback/blob/master/CHANGELOG.md#v130) - allow disabling of the dot rule -- copy-template-dir: v1.2.1 → v1.3.0 - support vars in filenames -- expect: v1.20.1 → [v1.20.2](https://github.com/mjackson/expect/compare/v1.20.1...v1.20.2) -- express: v4.13.4 → [v4.14.0](https://github.com/expressjs/express/blob/master/History.md#4140--2016-06-16) -- [figures](https://github.com/sindresorhus/figures): v1.7.0 -- file-loader: v0.8.5 → [v0.9.0](https://github.com/webpack/file-loader/compare/v0.8.5...v0.9.0) -- glob: v7.0.3 → [v7.0.5](https://github.com/isaacs/node-glob/compare/v7.0.3...v7.0.5) -- html-webpack-plugin: v2.19.0 → [v2.22.0](https://github.com/ampedandwired/html-webpack-plugin/blob/master/CHANGELOG.md#v2220) -- inquirer: v1.0.3 → [v1.1.2](https://github.com/SBoudrias/Inquirer.js/compare/v1.0.3...v1.1.2) -- karma: v0.13.22 → [v1.2.0](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md#120-2016-08-11) -- karma-chrome-launcher v1.0.1 -- karma-coverage: v1.0.0 → [v1.1.1](https://github.com/karma-runner/karma-coverage/blob/master/CHANGELOG.md#111-2016-07-23) -- karma-mocha-reporter: v2.0.3 → [v2.1.0](https://github.com/litixsoft/karma-mocha-reporter/compare/v2.0.3...v2.1.0) -- karma-phantomjs-launcher: v1.0.0 → [v1.0.1](https://github.com/karma-runner/karma-phantomjs-launcher/blob/master/CHANGELOG.md#101-2016-06-23) -- karma-webpack: v1.7.0 → [v1.8.0](https://github.com/webpack/karma-webpack/blob/master/CHANGELOG.md#180-2016-08-07) - remove dist from scm -- mocha: v2.5.3 → [v3.0.2](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#302--2016-08-08) -- npm-install-webpack-plugin: v4.0.1 → [v4.0.4](https://github.com/ericclemmons/npm-install-webpack-plugin/blob/master/CHANGELOG.md#404-2016-06-30) -- phantomjs-prebuilt: v2.1.7 → v2.1.12 - npm packaging fun -- postcss-loader: : v0.9.1 → [v0.10.0](https://github.com/postcss/postcss-loader/blob/master/CHANGELOG.md#0100) -- qs: v6.2.0 → [v6.2.1](https://github.com/ljharb/qs/blob/master/CHANGELOG.md#621) -- rimraf: v2.5.2 → [v2.5.3](https://github.com/isaacs/rimraf/compare/v2.5.2...v2.5.3) -- [webpack-fail-plugin](https://github.com/TiddoLangerak/webpack-fail-plugin): v1.0.5 -- webpack-hot-middleware: v2.10.0 → [v2.12.2](https://github.com/glenjamin/webpack-hot-middleware/compare/v2.10.0...v2.12.2) -- [webpack-md5-hash](https://github.com/erm0l0v/webpack-md5-hash): v0.0.5 -- webpack-merge: v0.14.0 → [v0.14.1](https://github.com/survivejs/webpack-merge/blob/master/CHANGELOG.md#0141--2016-07-25) - -# 0.11.1 / 2016-07-16 - -**Fixed:** - -- PostCSS config was not being created for the vendor/`node_modules/` loader for CSS preprocessor plugins [[#129](https://github.com/insin/nwb/issues/129)] - -# 0.11.0 / 2016-06-08 - -**Breaking Changes:** - -- Replaced the deprecated `autoprefixer-loader` with `postcss-loader` in default style pipelines - it's configured to do the same autoprefixing by default [[#57](https://github.com/insin/nwb/issues/57)] - - If you were configuring vendor prefixing using `webpack.loaders.autoprefixer`, you will now need to manage an `autprefixer` dependency yourself and use [`webpack.postcss`](https://github.com/insin/nwb/blob/0.11/docs/Configuration.md#postcss-object) to perform this configuration. - -**`nwb.config.js` Config Format Changes:** - -* `webpack.plugins` is deprecated - config under `webpack.plugins` should be moved up into `webpack` instead. Having certain config under a `plugins` prop was an implementation detail which wasn't relevant to end-users [[#113](https://github.com/insin/nwb/issues/113)] - - ```js - // < v0.11 - module.exports = { - webpack: { - plugins: { - define: {...}, - html: {...} - } - } - } - ``` - ```js - // v0.11 - module.exports = { - webpack: { - define: {...}, - html: {...} - } - } - ``` -* Support for flatter [Webpack loader configuration](https://github.com/insin/nwb/blob/0.11/docs/Configuration.md#loaders-object) was added. Having a `query` object is now optional - loader query configuration can now be placed directly under the loader's id [[#113](https://github.com/insin/nwb/issues/113)] - - ```js - // < v0.11 - module.exports = { - webpack: { - loaders: { - css: { - query: { - modules: true - } - } - } - } - } - ``` - ```js - // v0.11 - module.exports = { - webpack: { - loaders: { - css: { - modules: true - } - } - } - } - ``` - -**Added:** - -- Installing globally now adds a `react` command for quick React development starting from a single file. - - `react run entry.js` runs a development server. - - `react build entry.js` creates a static build. - - For these commands, Babel is preconfigured to allow you to use all of its Stage 0 features out of the box, including `async`/`await`. - - These are implemented by (the previously undocumented) `serve-react` and (new) `build-react` nwb commands. -- The entry point for apps and npm module UMD builds can now be specified as an argument to [`build` and `serve` commands](https://github.com/insin/nwb/blob/0.11/docs/Commands.md#project-type-specific-commands). The default is still `src/index.js`. [[#115](https://github.com/insin/nwb/issues/115)] -- The directory web apps are built into can now be specified as an argument to [`build`, `clean` and `serve` commands](https://github.com/insin/nwb/blob/0.11/docs/Commands.md#project-type-specific-commands). The default is still `dist/`. -- Added [`webpack.compat` config](https://github.com/insin/nwb/blob/0.11/docs/Configuration.md#compat-object) to enable compatibility tweaks for modules which are known to be problematic with Webpack - initially this includes support for Enzyme, Moment.js and Sinon.js 1.x [[#108](https://github.com/insin/nwb/issues/108)] -- Added [`webpack.postcss` config](https://github.com/insin/nwb/blob/0.11/docs/Configuration.md#postcss-array--object) to customise the PostCSS plugins applied to each style pipeline [[#57](https://github.com/insin/nwb/issues/57)] -- Added [`webpack.vendorBundle` config](https://github.com/insin/nwb/blob/0.11/docs/Configuration.md#vendorbundle-boolean) to disable automatically extracting anything imported from `node_modules/` out into a separate `vendor` chunk [[#106](https://github.com/insin/nwb/issues/106)] -- Added [documentation for creating and using a test context module](https://github.com/insin/nwb/blob/0.11/docs/Testing.md#using-a-test-context-module) if there's code you need to run prior to tests running, such as configuring your assertion library with additional assertions. -- Added a `--config` option to allow you to specify your own config file instead of `nwb.config.js`. - -**Changed:** - -- Apps are no longer required to provide their own HTML template. The default template path of `src/index.html` will continue to be used if a file exists there. If an alternative template is not provided via [`webpack.html` config](https://github.com/insin/nwb/blob/0.11/docs/Configuration.md#html-object), nwb will now fall back to using a basic template. -- Restored default use of the Babel polyfill in Karma config so tests (and their dependencies) can assume a modern environment. -- Default `babel-loader` config now uses [`cacheDirectory: true` for a speedup](https://github.com/babel/babel-loader#babel-loader-is-slow). -- Improved debug output (activated with a `DEBUG=nwb` environment variable) to print config objects in full - if you're configuring plugin objects (e.g. PostCSS plugins), it's recommended to create instances of them if you want to use debug output. -- `webpack.optimize.DedupePlugin` is now only used for production builds, as recommended in the Webpack docs. - -**Dependencies:** - -- html-webpack-plugin: v2.17.0 → [v2.19.0](https://github.com/ampedandwired/html-webpack-plugin/blob/master/CHANGELOG.md#v2190) -- inquirer: v1.0.2 → [v1.0.3](https://github.com/SBoudrias/Inquirer.js/compare/v1.0.2...v1.0.3) -- mocha: v2.4.5 → [v2.5.3](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#253--2016-05-25) -- npm-install-webpack-plugin: v3.1.2 → [v4.0.1](https://github.com/ericclemmons/npm-install-webpack-plugin/blob/master/CHANGELOG.md#401-2016-06-06) - saving is on by default and [a new `dev` option controls](https://github.com/ericclemmons/npm-install-webpack-plugin#usage) where installed dependencies get saved to -- [postcss-loader](https://github.com/postcss/postcss-loader): v0.9.1 -- redbox-noreact: v1.0.0 → [v1.1.0](https://github.com/insin/redbox-noreact/blob/master/CHANGES.md#110--2016-05-29) -- webpack: v1.13.0 → [v1.13.1](https://github.com/webpack/webpack/compare/v1.13.0...v1.13.1) -- webpack-merge: v0.12.0 → [v0.14.0](https://github.com/survivejs/webpack-merge/blob/master/CHANGELOG.md#0140--2016-06-05) - -# 0.10.0 / 2016-05-16 - -**Breaking Changes:** - -- React v15 is now installed into React app/component skeletons by default. - -**Changed:** - -- Default Karma config now includes `showDiff: true` config for the default Mocha reporter. -- The dev server now logs an initial `webpack building...` message so you know you're waiting for the initial build. -- npm scripts in the skeletons generated for `react-app` and `web-app` projects now use project type-specific commands, so the `nwb.config.js` included with them can be deleted if you don't need any config tweaks. -- nwb now passes the `--save` option to npm when installing React dependencies, to honour any npm [save-exact](https://docs.npmjs.com/misc/config#save-exact) (recommended!) or [save-prefix](https://docs.npmjs.com/misc/config#save-exact) config you have set. - -**Added:** - -- Extra Karma config can now be configured via a `karma.extra` Object. -- Added a `--react` option to allow you to set the version of React which will be installed when creating apps or components. This defaults to whatever the stable version of React was when the version of `nwb` you're using was released. - -**Dependencies:** - -- chalk: v1.1.1 → [v1.1.3](https://github.com/chalk/chalk/compare/v1.1.1...v1.1.3) - update deps -- cross-spawn: v2.1.5 → [v2.2.3](https://github.com/IndigoUnited/node-cross-spawn/compare/2.1.5...2.2.3) - update deps -- [detect-port](https://github.com/xudafeng/detect-port/): v1.0.0 -- expect: v1.16.0 → [v1.20.1](https://github.com/mjackson/expect/blob/master/CHANGES.md#v1201) -- html-webpack-plugin: v2.14.0 → [v2.17.0](https://github.com/ampedandwired/html-webpack-plugin/blob/master/CHANGELOG.md#v2170) -- inquirer: v0.12.0 → [v1.0.2](https://github.com/SBoudrias/Inquirer.js/compare/v0.12.0...v1.0.2) - switch to Promise-based API -- karma-coverage: v0.5.5 → [v1.0.0](https://github.com/karma-runner/karma-coverage/compare/v0.5.5...v1.0.0) -- karma-mocha: v0.2.2 → [v1.0.1](https://github.com/karma-runner/karma-mocha/compare/v0.2.2...v1.0.1) -- karma-mocha-reporter: v2.0.0 → [v2.0.3](https://github.com/litixsoft/karma-mocha-reporter/compare/v2.0.0...v2.0.3) -- npm-install-webpack-plugin: v3.0.0 → [v3.1.2](https://github.com/ericclemmons/npm-install-webpack-plugin/blob/master/CHANGELOG.md#v312-2016-05-12) [[#77](https://github.com/insin/nwb/issues/77)] -- phantomjs-prebuilt: v2.1.6 → [v2.1.7](https://github.com/Medium/phantomjs/releases/tag/v2.1.7) -- qs: v6.1.0 → [v6.2.0](https://github.com/ljharb/qs/blob/master/CHANGELOG.md#620) -- webpack: v1.12.14 → [v1.13.0](https://github.com/webpack/webpack/compare/v1.12.14...v1.13.0) -- webpack-merge: v0.8.4 → [v0.12.0](https://github.com/survivejs/webpack-merge/blob/master/CHANGELOG.md#0120--2016-04-19) - -# 0.9.2 / 2016-03-27 - -**Dependencies:** - -- webpack-dev-middleware: v1.6.0 → [v1.6.1](https://github.com/webpack/webpack-dev-middleware/compare/v1.6.0...v1.6.1) - fixes request path issue introduced in 1.6.0 - -# 0.9.1 / 2016-03-26 - -**Fixed:** - -- `style-loader` was not being specified to apply styles from additional chunks when extracting CSS. - -# 0.9.0 / 2016-03-26 - -**Breaking Changes:** - -- Changes to how React and plain JS web apps are built: - - Builds are now generated in `dist/` instead of `public/build/` - - `index.html` for builds is now generated based on a template in `src/index.html`, instead of using a static `public/index.html` [[#34](https://github.com/insin/nwb/issues/34)] - - **Upgrading existing projects:** - - - move your `public/index.html` to `src/index.html` and delete the `` and `