Nwb Versions Save

A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)

v0.24.0

4 years ago

0.24.0 / 2020-03-08 ♀️

Breaking Changes

  • Node.js 6 is no longer supported; Node.js 8.9.0 is now the minimum required version, as per many of nwb's dependencies.

  • Updated to Babel 7

    • babel.runtime config no longer accepts a String to enable an additional, named feature.

      Pass an Object with plugin options instead.

    • Support for tests in *-test.js files has been removed, as @babel-core no longer supports pattern matching them to ignore them when co-located in src/.

      Rename these to *.test.js instead.

  • Dropped support for the old --no-hmre alias to disable Hot Module Replacement, just use --no-hmr instead.

  • Updated Preact config for Preact X.

  • Dependencies with (documented) breaking changes:

Added

Fixed

  • Fix creation of an extra directory when creating a scoped component's UMD build [#513] [rrapiteanu]

Changed

  • React Refresh Webpack Plugin is now used to enable Fast Refresh for React apps, as babel-plugin-react-transform is deprecated and doesn't support Babel 7.
  • Replaced use of UglifyJsPlugin with TerserWebpackPlugin.
  • React compatibility is now always configured for Preact apps, as preact/compat is now part of the preact module.

Deprecated

  • Deprecated babel.stage config, as Babel's stage-X presets were/are being removed in Babel 7 - if you provide it, nwb will warn you and enable Babel proposal plugins equivalent to the current stage they're at.

    Use babel.proposals config instead if you want to toggle some or all additional proposal plugins on.

  • Deprecated webpack.uglify config, which has been renamed to webpack.terser.

  • Autoprefixer renamed its browsers option to overrideBrowserslist, so you will get deprecation warnings if you were using {browsers: ...} in webpack.autoprefixer config.

Dependencies

  • autoprefixer: v9.0.2 → v9.7.4
  • babel-plugin-add-module-exports: v0.2.1 → v1.0.2
  • babel-plugin-inferno: v5.0.1 → v5.1.0
  • case-sensitive-paths-webpack-plugin: v2.1.2 → v2.3.0
  • chalk: v2.4.1 → v3.0.0
  • copy-webpack-plugin: v4.5.2 → v5.1.1
  • cross-spawn: v6.0.5 → v7.0.1
  • css-loader: v1.0.0 → v3.4.2
  • detect-port: v1.2.3 → v1.3.0
  • figures: v2.0.0 → v3.2.0
  • filesize: v3.6.1 → v6.1.0
  • file-loader: v1.1.11 → v4.3.0
  • fs-extra: v7.0.0 → v8.1.0
  • glob: v7.1.3 → v7.1.6
  • gzip-size: v5.0.0 → v5.1.1
  • inquirer: v6.0.0 → v7.0.6
  • karma: v2.0.0 → v4.4.1
  • karma-chrome-launcher: v2.2.0 → v3.1.0
  • karma-coverage: v1.1.2 → v2.0.1
  • karma-webpack: v3.0.0 → v4.0.2
  • mini-css-extract-plugin v0.4.1 → v0.9.0
  • mocha: v5.2.0 → v7.1.0
  • opn: v5.3.0 → open v7.0.2
  • ora: v3.0.0 → v4.0.3
  • postcss-loader: v2.1.6 → v3.0.0 - dropped Node.js 4 support
  • promise: v8.0.1 → v8.1.0
  • resolve: v1.8.1 → v1.15.1
  • semver: v5.5.1 → v7.1.3
  • style-loader: v0.21.0 → v1.1.3
  • uglifyjs-webpack-plugin v1.2.7 → terser-webpack-plugin v2.3.5
  • url-loader: v1.0.1 → v2.3.0
  • webpack: v4.16.4 → v4.42.0
  • webpack-dev-middleware: v3.1.3 → v3.7.2
  • webpack-dev-server: v3.1.5 → v3.10.3
  • webpack-hot-middleware: v2.22.3 → v2.25.0
  • webpack-merge: v4.1.4 → v4.2.2
  • whatwg-fetch: v2.0.4 → v3.0.0

v0.23.0

5 years ago

Breaking Changes

  • Updated Inferno config for Inferno 5 - inferno-* packages (such as inferno-compat) work again with Webpack 4 [#440]

Added

  • Added prepublishOnly to react-component and web-module project package.json scripts, which invokes npm run build prior to publishing [#436] [hanford]
  • Added npm.umd.entry config 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]

Fixed

  • Always add CopyPlugin when webpack.copy config is provided [#431]
  • Remove use of object destructuring from render shims - fixes output of quick build commands in IE11 [#453]

Dependencies

  • autoprefixer: v8.1.0 → v9.0.2
  • babel-core: v6.26.0 → v6.26.3
  • babel-loader: v7.1.4 → v7.1.5
  • babel-plugin-inferno: v4.0.0 → v5.0.1
  • babel-plugin-istanbul: v4.1.5 → v4.1.6
  • babel-plugin-transform-decorators-legacy: v1.3.4 → v1.3.5
  • chalk: v2.3.2 → v2.4.1
  • copy-template-dir: v1.3.0 → v1.4.0
  • copy-webpack-plugin: v4.5.1 → v4.5.2
  • css-loader: v0.28.10 → v1.0.0
  • detect-port: v1.2.2 → v1.2.3
  • filesize: v3.6.0 → v3.6.1
  • fs-extra: v6.0.0 → v7.0.0
  • gzip-size: v4.1.0 → v5.0.0 - dropped Node.js 4 support
  • html-webpack-plugin: v3.0.6 → v3.2.0
  • inquirer: v5.1.0 → v6.0.0
  • karma: v2.0.0 → v2.0.5
  • karma-coverage: v1.1.1 → v1.1.2
  • karma-webpack: v2.0.13 → v3.0.0
  • mini-css-extract-plugin v0.2.0 → v0.4.1
  • mocha: v5.0.4 → v5.2.0
  • opn: v5.2.0 → v5.3.0
  • ora: v2.0.0 → v3.0.0
  • postcss-loader: v2.1.1 → v2.1.6
  • resolve: v1.5.0 → v1.8.1
  • run-series: v1.1.6 → v1.1.8
  • style-loader: v0.20.2 → v0.21.0
  • uglifyjs-webpack-plugin: v1.2.3 → v1.2.7
  • webpack: v4.1.1 → v4.16.4
  • webpack-dev-middleware: v3.0.1 → v3.1.3
  • webpack-dev-server: v3.1.1 → v3.1.5
  • webpack-hot-middleware: v2.21.2 → v2.22.3
  • webpack-merge: v4.1.2 → v4.1.4
  • whatwg-fetch: v2.0.3 → v2.0.4

Docs

v0.22.0

6 years ago

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]
  • 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]
    • 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:
      • Separate CSS files are now created and loaded on-demand for code splits.
      • Replaced webpack.extractText config with webpack.extractCSS config - 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 v4 - see the Inferno v4 migration guide for breaking changes [#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

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
  • babel-loader: v7.1.2 → v7.1.4
  • babel-plugin-inferno: v3.3.1 → v4.0.0
  • case-sensitive-paths-webpack-plugin: v2.1.1 → v2.1.2
  • chalk: v2.3.0 → v2.3.2
  • copy-webpack-plugin: v4.3.1 → v4.5.1
  • cross-spawn: v6.0.4 → v6.0.5
  • css-loader: v0.28.9 → v0.28.10
  • extract-text-webpack-plugin v3.0.0 → mini-css-extract-plugin v0.2.0
  • filesize: v3.5.11 → v3.6.0
  • inquirer: v3.3.0 → v5.1.0 - latest version requires Node.js 6
  • karma-webpack: v2.0.9 → v2.0.13
  • mocha: v4.1.0 → v5.0.4
  • 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
  • postcss-loader: v2.0.10 → v2.1.1
  • style-loader: v0.20.1 → v0.20.2 - skip empty url()s
  • uglifyjs-webpack-plugin: v1.1.8 → v1.2.3
  • url-loader: v0.6.2 → v1.0.1
  • webpack: v3.10.0 → v4.1.1
  • webpack-dev-middleware: v1.12.2 → v3.0.1
  • webpack-dev-server: v2.9.7 → v3.1.1
  • webpack-hot-middleware: v2.21.0 → v2.21.2
  • webpack-merge: v4.1.1 → v4.1.2

Internal

  • Updated StatusPlugin and InlineRuntimePlugin to use the Use the new Webpack 4 .hooks plugin API.

Docs

v0.21.5

6 years ago

Dependencies

  • cross-spawn: v6.0.3 → v6.0.4

v0.21.4

6 years ago

Fixed

  • Fixed validation of webpack.compat locale properties [#425]
  • Fixed false negative when checking if the port is available when devServer.port is specified as a String [#423]

Dependencies

  • uglifyjs-webpack-plugin: v1.1.6 → v1.1.8 - reduce memory consumption

v0.21.3

6 years ago

Changed

Dependencies

v0.21.2

6 years ago

Fixed

  • Fixed validation of babel.env config [#420] [ngyikp]

Dependencies

v0.21.1

6 years ago

Fixed

  • Fixed validation of webpack.extractText = false config, which disables extraction of imported stylesheets into .css files [#418]

Dependencies

  • postcss-loader: v2.0.9 → v2.0.10
  • uglifyjs-webpack-plugin: v1.1.5 → v1.1.6

v0.21.0

6 years ago

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]
    • 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) are now treated as errors [#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, 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]
    • Review any custom webpack.uglify config you have against the new version's options documentation - 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 - the Babel stage preset wasn't being defaulted to preset-stage-1, which includes the export extensions plugin [#364]

Added

  • Added an --open flag 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]
  • You can now provide a babel.config() function which will be given the generated Babel config to do whatever it wants with.
  • You can now provide a karma.config() function which will be given the generated Karma config to do whatever it wants with [#408]

Changed

Dependencies

  • autoprefixer: v7.1.6 → v7.2.4
  • babel-plugin-inferno: v3.3.0 → v3.3.1
  • copy-webpack-plugin: v4.2.1 → v4.3.1
  • file-loader: v1.1.5 → v1.1.6
  • gzip-size: v4.0.0 → v4.1.0
  • karma: v1.7.1 → v2.0.0
  • karma-webpack: v2.0.6 → v2.0.9
  • mocha: v4.0.1 → v4.1.0
  • postcss-loader: v2.0.8 → v2.0.9
  • style-loader: v0.19.0→ v0.19.1
  • webpack: v3.8.1 → v3.10.0
  • webpack-dev-server: v2.9.4 → v2.9.7
  • webpack-dev-middleware: v1.12.0 → v1.12.2
  • webpack-hot-middleware: v2.20.0 → v2.21.0

Docs

  • Added missing docs for webpack.copy config
  • Added more headings to the Commands docs to make them easier to browse, and to make feature flags such as --copy-files for component builds more visible [#407]

v0.20.0

6 years ago

Breaking Changes

  • Updated UMD build config to export the default export of the entry point, 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]
  • Updated to Mocha 4, which comes with a number of 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
  • detect-port: v1.2.1 → v1.2.2
  • karma-webpack: v2.0.5 → v2.0.6
  • mocha: v3.4.2 → v4.0.1 - 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]