I'm using webpack with Elm, and find that the watch only survives one set of changes (in fact it will keep on watching as long as the compile phase is successful, but only survives one failed compilation).
I've already tried OldWatchPlugin and increasing the watches (on Ubuntu and OSX).
I'm not at all familiar with webpack (but wanted its hot reloading), so any comments just on my startup ("webpack-dev-server --hot --inline --port 3000"
) or config (below) would already be helpful.
var webpack = require('webpack');
module.exports = {
entry: './src/index.js',
output: {
path: './dist',
filename: 'index.js'
},
resolve: {
modulesDirectories: ['node_modules'],
extensions: ['', '.js', '.elm', '.scss', '.css']
},
module: {
loaders: [
{
test: /\.html$/,
exclude: [/ignore/, /node_modules/],
loader: 'file?name=[name].[ext]'
}, {
test: /\.elm$/,
exclude: [/ignore/, /elm-stuff/, /node_modules/],
loader: 'elm-hot!elm-webpack'
}, {
test: /\.scss$/,
exclude: [/ignore/, /elm-stuff/, /node_modules/],
loaders: ["style", "css", "sass"]
}, {
test: /\.css$/,
exclude: [/ignore/, /elm-stuff/, /node_modules/],
loaders: ["style", "css"]
}, {
// test: /\.(svg|png|jpg)$/,
test: /\.(eot|woff|woff2|ttf|svg|png|jpg)$/,
// include: [ /node_modules\/bootstrap-sass/, /src/],
// exclude: [/ignore/, /elm-stuff/],
// loader: 'url-loader?limit=10000'
loader: 'url-loader?limit=10000&name=[name]-[hash].[ext]'
}, {
test:/bootstrap-sass[\/\\]assets[\/\\]javascripts[\/\\]/, loader: 'imports?jQuery=jquery'
}
],
noParse: /\.elm$/
},
plugins: [
new webpack.OldWatchingPlugin()
],
devServer: {
stats: 'errors-only'
}
};