1
的WebPack 2配備了新的決心的設置,當我嘗試修改配置設置,如下所示,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()
]
})
此答案並不真正幫助用戶 – Nolwennig
完全正確...編輯,希望這有助於...現在... –