var webpack = require('webpack');
module.exports = {
// devtool: 'source-map',
// devtool: 'eval-source-map',
debug: true,
devServer: {
contentBase: __dirname +'/src/endpoint',
colors: true,
noInfo: true,
host: '127.0.0.1',
port: 8000,
inline: true,
hot: true,
publicPath: '/static/'
},
context: __dirname + '/src',
entry: {
app: [
'es6-shim',
'reflect-metadata',
'./app/app'
]
},
output: {
path: __dirname + '/src/endpoint/static',
filename: '[name].js'
},
plugins: [
new webpack.NoErrorsPlugin()
],
module: {
loaders: [
{
test: /\.js$/,
exclude: [
/node_modules/
],
loader: 'babel',
query: {
stage: 0
}
}
]
}
};
Here is my current setup. I don't understand how to force webpack watch specific files? e.g. I want to trigger compilation when any file matching /\.html$/
is updated.
You might want to try out a library like webpack-service. Webpack's own watcher is a little limited sometimes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With