- 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
2.3.0 configure isDev
default automatically based on whether the command used contains webpack-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
- don't resolve .styl extensions
- add option for
urlLoaderLimit
2.0.0 instead of including our own pre-configured dev server: hjs-dev-server
you can now just use webpack-dev-server
in your npm scripts
and it gets configured via devServer
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