Изучаю Webpack. При запуске сервера выдает:
D:\projects\redux_course>node server.js
D:\projects\redux_course\node_modules\webpack\lib\webpack.js:19
throw new WebpackOptionsValidationError(webpackOptionsValidation
Errors);
^
Error
at webpack (D:\projects\redux_course\node_modules\webpack\lib\webpack.js:19:
9)
at Object. (D:\projects\redux_course\server.js:7:16)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
at Module.runMain (module.js:607:10)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)
D:\projects\redux_course> throw new WebpackOptionsValidationError(webpackOptionsValidation)
Конфиг:
var path = require('path')
var webpack = require('webpack')
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client',
'babel-polyfill',
'./src/index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel",
exclude: [
/node_modules/,
path.resolve(__dirname, "src"),
],
query: {
presets: [ 'es2015' ]
},
plugins: ['transform-runtime'],
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
]
}