Reputation: 351
I am installing marionette using webpack and NPM according to marionette guide. I modify the webpack.config.js as below:
var webpack = require('webpack');
module.exports = {
entry: './app/driver.js',
module: {
loaders: [
{
test: /\.html$/,
loader: 'underscore-template-loader'
}
]
},
output: {
path: __dirname + '/static/js',
filename: 'bundle.js'
},
plugins: [
new webpack.ProvidePlugin({
_: 'underscore'
})
],
resolve: {
modules: [__dirname + '/node_modules', __dirname + '/app']
},
resolveLoader: {
modules: [__dirname + '/node_modules']
}
};
however when build the application, I have the error:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.module has an unknown property 'loaders'. These properties are valid:
object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, noParse?, rules?, defaultRules?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp?, strictExportPresence?, strictThisContextOnImports? }
-> Options affecting the normal modules (NormalModuleFactory
).
Could you please help solving this error?
Upvotes: 3
Views: 3757