I got my webpack config to work with Babel 6 with this setup:
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
include: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules', 'prosemirror')
],
// Need this here for prosemirror til it has own .babelrc
query: {
presets: ['es2015']
}
},
...
Edit: noticed that I’m doing the same thing as the OP, using query
, but I’m also specifically including node_modules/prosemirror since I’m using it as a dependency.