Reputation: 819
I am following a tutorial on webpack 4 where the person indicated that I do not need to specify a config file.
Here are my npm commands:
webpack --mode development
webpack --mode production
But yet i get the warning that no mode has been specified and thus production has been used my default.
May i know what is going on here?
This is my package.json:
{
"name": "Datum_GUI",
"version": "1.0.0",
"description": "Frontend for the DATUM portal",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack --mode development",
"build": "webpack --mode production"
},
"keywords": [],
"author": "GTI Storage SAN CIE",
"license": "ISC",
"devDependencies": {
"webpack": "^4.34.0",
"webpack-cli": "^3.2.3"
}
}
Upvotes: 1
Views: 41
Reputation: 1459
The argument is malformed, is missing an =
, should be webpack --mode=production
or webpack --mode=development
Upvotes: 2