I recently upgraded from Webpack 3 to 4.
Here is my webpack.dev.js file:
module.exports = {
mode: 'development',
entry: './src/index.js',
output: {
filename: 'public/bundle.js'
},
Expected Behaviour
It should be creating my bundle.js
in the public
folder.
Actual Behaviour
It's creating a main.js
file in a folder called dist
Conclusion
For some reason the output is no longer working as it should.
Question
How should I be generating the filename?
Here is the script I run:
"scripts": {
"watch": "./node_modules/.bin/webpack --mode development --watch --progress",
},