In my package.json file I have:
"scripts": {
"dev": "webpack --mode development ./x/frontend/src/index.js --output ./x/frontend/static/frontend/main.js",
"build": "webpack --mode production ./x/frontend/src/index.js --output ./x/frontend/static/frontend/main.js"
},
and when I try to run this command: npm run build it shows me an error: [webpack-cli] Error: Unknown option '--output'
How can I fix this?
It is nothing to do with Django. It is webpack module.
Apparently you are using old version of webpack.
You have to use --output-path instead of --output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With