【发布时间】:2017-01-09 04:58:39
【问题描述】:
Webpack 2 带有新的解析设置,当我尝试修改 config 中的设置时,如下所示,webpackValidator 会抛出错误提示
不允许使用“模块”
const config = webpackValidator({
context: resolve('src'),
entry: './app.js',
output: {
filename: 'bundle.js',
path: resolve('dist'),
publicPath: '/dist/',
pathinfo: ifNotProd(),
},
devtool: ifProd('source-map', 'eval'),
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel'],
exclude: /node_modules/
}
]
},
resolve: {
extensions: ['.js'],
modules: [
resolve(__dirname, 'src'),
resolve(__dirname, 'node_modules')
]
},
plugins: [
new DashboardPlugin()
]
})
【问题讨论】:
标签: webpack-dev-server webpack-2