- Update dependencies to their latest versions, including webpack to version 3 (#349)
- Use UglifyJS directly to make use of a version that supports ES2015 code (#349)
- Update examples to confirm with new linting rules (#333)
- Add support for using different NODE_ENV values than
production
in production build (#332) - Add CORS headers to response on static files served by dev server (#242)
- Add support for using
postcss.config.js
to configure PostCSS (#327)
- Add support for webpack 2. Although there are no differences in the API, this version requires you
to migrate to webpack@^2.2.1. You will also have to update your loader dependencies to their newest majors
as well, as many of them have come out with webpack 2 support.
If you have extended the configuration created by
hjs-webpack
, you will have to migrate those changes as well. Please have a look at the official migration guide for advice on how to do this.
- Do not replace all environment variables in production #296
- Change how default name and version are specified for #255
- Add
compression
to dependencies #291
- Add
compression
option to dev server #240 - Add
pug-loader
to work with.pug
files (and be backward compatible with.jade
files) #271 - Add option to set
devtool
whenisDev
is true #276 - Use a default
package.name
andpackage.version
so it doesn't error without them #255
- Add support for
webpack-visualizer-plugin
#190 - Throw error if trying to clear a directory containing the current working directory #186
- Allow setting uglifyjs options from config #81
- Add support for dev server proxies with
http-proxy-middleware
#198
Since hot module reloading can be done in many different forms (see this blog post and this PR for more info), hjs-webpack
no longer looks at which loaders/plugins you have installed to determine if HMR should be turned on or off, and instead only looks at the config option devServer.hot
to determine if the HMR entry path and plugins should be added to the config.
By default, HMR has always been set to true
, but previously if you didn't have a specific set of plugins installed hjs-webpack
would set it to false
. This is no longer the case, and is the reason why this is a major update. If you are not using HMR, then you now need to set devServer.hot = false
in your config to turn it off.
- Update
webpack-hot-middleware
to^2.8.1
- Update dependencies, and pin
webpack-hot-middleware
to2.7.1
for now to avoid this issue
- Fix HMR when using npm2 #161
- Add
https
option to dev server #159
- Add
lang
option to default html template #151
The hot module loader changed from react-hot-loader to babel-blugin-react-transform. This is a breaking change and means you need to upgrade your installation when trying to use the newest version of hjs-webpack.
If you want to continue to use hot reloading make sure to add this preset to your project's devDependencies
to your project:
npm i --save-dev babel-preset-react-hmre
You can then remove webpack-dev-server
by running:
npm uninstall --save-dev webpack-dev-server
And add the following to your .babelrc
file:
{
"env": {
"development": {
"presets": ["react-hmre"]
}
}
}
Then finally, in the scripts
section of your package.json
you should change webpack-dev-server
to hjs-dev-server
.
- Add
react-hot-loader
tocoffee-loader
- Change font loaders to match query strings and separate all font loaders into separate loader entries. This should now work out of the box with projects like
bootstrap-webpack
andfont-awesome-webpack
. This is a breaking change because existing modifications to font loaders in a user'swebpack.config.js
may clash with the new font loaders. See #115 for more info.
- Use
url-loader
for.woff2
files
- Add worker-loader
- Update dependencies
- Make
defaultTemplate
render<div id="root"></div>
into the body by default as a mount point for React. See #89 for reasoning.
- Remove
relative
option from template in lieu of a more flexiblepublicPath
option.
- Add support for the following loaders:
coffee cjsx typescript livescript
.
- Remove
peerDependencies
and make them optional. See the optional dependencies section in the README for new installation instructions. #26 #80
- Only use react-hot-loader if specified by devServer
hot
option
- Add https support
- Pin dependencies (setup Greekeeper.io)
- Replace
autoprefixer-core
withautoprefixer
- Update
examples/
dependencies
- use cheap-module-eval-source-map devtool in dev #63
- remove noerrors plugin and for react-hot-loader@^1.3.0 #62
- Update
extract-text-webpack-plugin
and other dependencies - Get
npm test
passing forstandard
linting
- Add
react
to peer deps
- Fix
react-hot-loader
is installed check
- Don't assume
process.argv[1]
exists. This can happen if running vianode -p
, thanks @eins78.
- Don't force install of React or React Hot-Loader only use them and other optional installs if installed. Thanks @FWeinb
- Add ability to pass
metaTags
object as adefaultTempate
option for easily adding<meta>
tags.
- Add
sass-loader
for.scss
and ``sass` files
- Allow globs for
clearBeforeBuild
. - Expose webpack
stats
object to context - Expose parsed
package.json
object tohtml
function context argument. - Set
out
folder ascontentBase
for the dev server.
- Fix typo in
examples/just-assets-no-html/README.md
- add documentation for relative links in html
- add
serveCustomHtmlInDev
as an explicit option - properly document new option and
isDev
in html function
- Expose
isDev
flag tohtml
function context - Document
replace
option in readme.
- Fix less filename test when in production mode
- Add documentation about using html function's css context and cssFilename in production mode
- Allow
devServer
options to be passed in
- Use passed in
urlLoaderLimit
- Add default url loader for images
- Resolve
.jsx
extension
- configure
isDev
default automatically based on whether the command used containswebpack-dev-server
or not (still respects explicitly configured, so not a breaking change) - add
clearBeforeBuild
option to clear build folder first. - both the above changes allow an app to share configs because you're not having to clear the build dir, or set environment variables two different ways for different platforms (a.k.a. better windows support).
- doc fixes/improvements
- use
process.cwd()
overprocess.env.PWD
to find root.
- include
json-loader
by default.
- use
autoprefixer-core
andpostcss-loader
to add autoprefixing to all configured style loaders - don't resolve .styl extensions
- pre-configure
.jade
and.less
loaders as optional installs. - add option for
urlLoaderLimit
- instead of including our own pre-configured dev server:
hjs-dev-server
you can now just usewebpack-dev-server
in your npmscripts
and it gets configured viadevServer
property of config. - much more complete documentation
- support for passing options to
defaultTemplate()
function - simplified/unified configuration
- support for setting global
hostname
(see above) - now includes main babel package by default
- add warnings/instructions about npm
3.x.x
's handling of peer dependencies