Releases: insin/nwb
v0.9.2
v0.9.1
v0.9.0
Breaking Changes:
- Changes to how React and plain JS web apps are built:
-
Builds are now generated in
dist/
instead ofpublic/build/
-
index.html
for builds is now generated based on a template insrc/index.html
, instead of using a staticpublic/index.html
[#34]Upgrading existing projects:
- move your
public/index.html
tosrc/index.html
and delete the<link>
and<script>
tags forvendor
andapp
resources. These will now be injected at build time. - replace
/public/build
in your.gitignore
with/dist/
- move your
-
public/
is now only for public files - any contents in this directory will now be copied todist/
at the start of a build. The development server will also serve static content frompublic/
.
-
Removed:
- Backwards compatibility for
nwb.config.js
format changes made in 0.8 have been removed.
Added:
- Added a
--host
option when running the dev server [#50] ExtractTextPlugin
(used to extract CSS when building) can now be configured usingwebpack.plugins.extractText
config - this allows you to configure theallChunks
setting if you want all CSS to be extracted when using code splitting.HtmlWebpackPlugin
(used to generate anindex.html
when building) can now be configured usingwebpack.plugins.html
config.
Changed:
breakConfig: true
has been added to defaultbabel-loader
config to avoid.babelrc
files being resolved by Babel - all Babel configuration is expected to be innwb.config.js
[#63]- Static resources handled by Webpack's
file-loader
now include a hash in their filenames for cachebusting when they change [#38]
Dependencies:
- babel: v5.8.34 → v5.8.38 - left-pad transitive dependency drama
- babel-core: v5.8.34 → v5.8.38 - left-pad transitive dependency drama
- connect-history-api-fallback: v1.1.0 → v1.2.0 - support custom
Accept
headers - copy-template-dir: v1.2.0 → v1.2.1 - support large template folders
- expect: v1.14.0 → v1.16.0 - mostly packaging changes?
- fs-extra: v0.26.5 → 0.26.7 - bug fixes for
copy
andemptyDir
- glob: v7.0.0 → v7.0.3 - misc fixes
- html-webpack-plugin: v2.9.0 → v2.14.0
- karma: v0.13.21 → v0.13.22 - removed a large test file from npm package
- karma-coverage: v0.5.3 → v0.5.5 - bug fixes
- karma-mocha-reporter: v1.2.3 → v2.0.0 - add karma to peerDeps; wait for all browsers to run
- npm-install-webpack-plugin: v2.0.2 → v3.0.0 -
resolve.alias
andresolve.root
support [#83] - phantomjs-prebuilt: v2.1.4 → v2.1.6 - minor fixes to custom CA handling
- react-transform-hmr: v1.0.2 → v1.0.4 - update react-proxy to fix a few correctness issues
- style-loader: v0.13.0 → v0.13.1 - add query to style/useable
- webpack-dev-middleware: v1.5.1 → v1.6.0
- webpack-hot-middleware: v2.7.1 → v2.10.0 - improved error overlay styling
- webpack-merge: v0.7.3 → v0.8.4 - change merging behavior so only loaders get prepended
v0.8.1
v0.8.0
Breaking Changes:
-
npm-install-webpack-plugin
is now used instead ofnpm-install-loader
to implementnwb serve --auto-install
.If you were configuring automatic npm installation using a
loaders.install.query.cli
config object, this should be moved towebpack.plugins.install
instead.
nwb.config.js
Format Changes:
nwb v0.8 will support the old format and display warning messages about the changes required before upgrading to nwb v0.9.
-
React component and vanilla JS module npm build configuration must now be specificed as a
build
object:// < v0.9 module.exports = { type: 'react-component', externals: {react: 'React'}, global: 'MyComponent', jsNext: true, umd: true }
// v0.9 module.exports = { type: 'react-component', build: { externals: {react: 'React'}, global: 'MyComponent', jsNext: true, umd: true } }
-
Webpack configuration must now be specified as a
webpack
object:// < v0.9 module.exports = { type: 'react-app', loaders: { css: { query: { modules: true } } } }
// v0.9 module.exports = { type: 'react-app', webpack: { loaders: { css: { query: { modules: true } } } } }
-
Webpack
define
config must now be specified in aplugins
object:// < v0.9 module.exports = { type: 'react-app', define: { __VERSION__: JSON.stringify(require('./package.json').version) } }
// v0.9 module.exports = { type: 'react-app', webpack: { plugins: { define: { __VERSION__: JSON.stringify(require('./package.json').version) } } } }
-
All "extra" Webpack config must be specified in a an
extra
object, including extra loaders. The new object must correspond with Webpack's config file layout.// < v0.9 module.exports = { type: 'react-app', loaders: { extra: [/* ... */] } }
// v0.9 module.exports = { type: 'react-app', webpack: { extra: { module: { loaders: [/* ... */] } } } }
Changes:
nwb.config.js
is now only required when running generic build commands:build
,clean
,serve
,test
type
config is only required when running a generic build command, but if provided it must be valid.
- Karma tests now always run just once in a CI environment regardless of the
--server
flag - this allows you to use--server
in your defaultnpm test
command if you want to, without needing a separate run script for CI. - Development instructions in project templates were moved from
README.md
to aCONTRIBUTING.md
file, and are now documented usingnpm
andnpm run
commands instead of globalnwb
commands. - All commands are now run in the current working directory - you no longer need to
require.resolve()
full paths to extra Babel plugins configured innwb.config.js
, just use their names as normal and Babel will now be able to import them. - Upgraded to PhantomJS v2 for Karma tests.
- Babel polyfills are no longer included in Webpack config for Karma, as PhantomJS v2 uses a more recent version of WebKit.
Added:
- Extra webpack config can now be configured via a
webpack.extra
Object.- To support adding other webpack built-in plugins via
extra
, if a function is exported fromnwb.config.js
, it will now be called with an object containing the following properties:command
- the nwb command being executedwebpack
- the webpack module (for configuring extra plugins using nwb's version of webpack)
- To support adding other webpack built-in plugins via
- Project type-specific versions of the
build
,clean
andserve
commands are now officially documented for direct use. - A
test:watch
npm script was added to project templatepackage.json
.
Dependencies:
- autoprefixer-loader: v3.1.0 → v3.2.0
- cross-spawn: v2.1.4 → v2.1.5 - update
which
dependency (minor) - expect: v1.13.4 → v1.14.0 - new features
- express: v4.13.3 → v4.13.4 - deps
- extract-text-webpack-plugin: v0.9.1 → v1.0.1 - use webpack-sources
- glob: v6.0.3 → v7.0.0 - throw if cwd is not a directory
- html-webpack-plugin: v1.7.0 → v2.9.0
- inquirer: v0.11.2 → v0.12.0
- karma: v0.13.18 → v0.13.21 - socket.io 1.4.5 seems to have fixed the post-test hanging issue, bug fixes and new features
- karma-mocha: v0.2.1 → v0.2.2
- karma-mocha-reporter: v1.1.5 → v1.2.2 - add diff output for failed tests
- karma-phantomjs-launcher: v0.2.3 → v1.0.0 - use phantomjs-prebuild
- mocha: v2.3.4 → v2.4.5
- phantomjs v1.9.19 → phantomjs-prebuilt v2.1.4 - update installer to PhantomJS 2.x, renamed package
- qs: v5.2.0 → v6.1.0 - revert ES6 requirement, new
allowDots
option and some fixes - react-transform-catch-errors: v1.0.1 → v1.0.2 - remove some files from the npm package
- react-transform-hmr: v1.0.1 → v1.0.2 - remove some files from the npm package
- resolve: v1.1.6 → v1.1.7 - fix
node_modules
paths on Windows - rimraf: v2.5.0 → v2.5.2
- webpack: v1.12.11 → v1.12.14 - fix Windows filename backslash incompatibility
- webpack-dev-middleware: v1.4.0 → v1.5.1 - platform-agnostic path joining, use
res.send
when available - webpack-hot-middleware: v2.6.0 → v2.7.1 - improve hint when hot reloads aren't accepted, update
strip-ansi
dependency (major), update stats handling
v0.7.2
Fixed:
react-app
andweb-app
Webpack build config didn't haveoutput.publicPath
set, so images required from JavaScript weren't being found [#55]- Test runs no longer hang for up to a minute after completion [#49]
Dependencies:
- inquirer: v0.11.1 → v0.11.2 - display fixes
- karma: v0.13.19 → v0.13.18 - downgraded due to the test hanging issue being introduced
- karma-sourcemap-loader: v0.3.6 → v0.3.7 - avoid EMFILE errors; fix charset bug; fix RangeError exception
- socket.io: v1.3.7 - temporarily pinned in nwb's dependencies until the Karma test hang issue is resolved
- webpack: v1.12.10 → v1.12.11
- webpack-merge: v0.7.2 → v0.7.3 - bugfix
v0.7.1
Fixed:
- Express middleware had a broken import.
Added:
- Added an
autoInstall
option to Express middleware.
Dependencies:
v0.7.0
Fixed:
- Fall back to nwb's dependencies in Webpack config instead of using an alias so
babel-runtime
can be picked up whenoptional: ['runtime']
is used [hopefully fixing the weird/node_modules/node_modules/
issue seen in #37]
Added:
- Added an
--auto-install
flag tonwb serve
which automatically installs npm dependencies and saves them to your package.json while developing.
Removed:
jsNext
config no longer defaults totrue
if not present.
Changed:
- Use
.x
for dependencies when generating skeleton projectpackage.json
instead of range sigils.
Dependencies:
- babel-runtime: v5.8.34 → v5.8.29 - downgraded due to a regression in typeof-react-element.js when used in conjunction with
optional: ['runtime']
- karma: v0.13.16 → v0.13.18
- karma-phantomjs-launcher: v0.2.2 → v0.2.3 - correct cli argument order
- webpack-merge: v0.7.0 → v0.7.1 - performance improvements
v0.6.4
v0.6.3
Fixed:
- Exit the process correctly with a non-zero exit code when an async command fails, such as
nwb test
[#36] [jihchi]
Dependencies:
- karma-mocha-reporter: v1.1.4 → v1.1.5 - show error message when karma runner ends with error
- webpack-merge: v0.5.1 → v0.7.0 - bug fix for merging arrays within nested structures