1
我想让WDS自动重新编译并重新加载我的页面。Webpack开发服务器 - 重新加载/重新编译不起作用
我的WebPack配置如下:
module.exports = {
devtool: 'eval',
entry: './app/js/index.js',
output: {
filename: './public/js/index.js'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules)/,
loader: 'babel-loader'
},
{
test: /\.scss$/,
exclude: /(node_modules)/,
use: [
{ loader: 'style-loader' },
{ loader: 'css-loader' },
{ loader: 'sass-loader' }
]
}
]
},
devServer: {
publicPath: "./public",
hot: true
}
};
访问localhost:8080
给我index.html
页,但没有任何注入的代码。我能做什么?
我使用的WebPack 2.2.1的WebPack开发服务器2.3.0。