I had installed it globally by running npm install webpack -g and I had included it in my project by running npm install webpack --save-dev.
However, on running the
I ran into this problem after following Webpacks docs for production builds. The way I ran into the issue is, I believe, specific to webpack-merge.
This is what their docs have in webpack.dev.js:
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
module.exports = merge(common, {
devtool: 'inline-source-map',
devServer: {
contentBase: './dist'
}
});
But this is what I needed to have:
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
module.exports = merge(common(), {
devtool: 'inline-source-map',
devServer: {
contentBase: './dist'
}
});
Notice the only change is running common() instead of common.