How to view specific files using webpack?
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 get webpack to look at specific files? for example I want to trigger compilation when any file matching is updated /\.html$/
.
+3
source to share
1 answer
You might want to try a library like webpack-service . Usually the Webpack observer is a bit limited.
+1
source to share