I have the following Webpack config:
{
resolveLoader: {
root: path.join(__dirname, 'node_modules')
},
module: {
loaders: [
{
test: /\.es6?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
sourceMap: true,
presets: [
'es2015'
],
plugins: [
'transform-class-properties'
]
}
}
]
}
}
My project structure:
.
+-- deploy
| +-- node_modules
| +-- Gulpfile.js
+-- es6
| +-- Source files
The error I get:
ERROR in ../es6/src.es6
Module build failed: ReferenceError: Unknown plugin "transform-class-properties" specified in "base" at 0, attempted to resolve relative to "[ABSOLUTE_PATH]/es6"
Seems like resolveLoader doesn't work for some reason.
Tried to remove the transform-class-properties
plugin and I'll get the same error for the es2015
preset.
Any suggestion?