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
Try exporting your configuration using module.exports = config
where config is your configuration in a JavaScript object. In your case just do
module.exports = {
output: {
filename: 'bundle.js',
library: 'require',
libraryTarget: 'this'
}
}
If this does not solve your problems, refer to the issue on https://github.com/webpack/webpack/issues/2403