[Feature Request] Add vue-cli-service equivalent --mode option
samsour opened this issue · 0 comments
samsour commented
Describe the bug
Hey, I am using the vue-cli-service für vue 3 and would like to have an option --mode
to set specific environments or settings (without setting NODE_ENV=development npm run something).
Steps to reproduce the behavior
I have somthing like this in my package.json.
...,
"scripts": {
"build": "vue-cli-service build --mode development",
"lint": "vue-cli-service lint",
"storybook:build": "vue-cli-service storybook:build -c config/storybook --mode development",
"storybook:serve": "vue-cli-service storybook:serve -p 7007 -c config/storybook --mode development"
},
...
Expected behavior
npm run build
works fine as described in https://cli.vuejs.org/guide/mode-and-env.html#modes.
npm run storybook:build
and npm run serve
crash and throw the error posted below.
Screenshots and/or logs
error: unknown option `--mode'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-webpack-test@0.1.0 storybook:serve: `vue-cli-service storybook:serve -p 7007 -c config/storybook --mode development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-webpack-test@0.1.0 storybook:serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Environment
- OS: MacOS Big Sur 11.4 (20F71)
- Node.js version: [e.g. v14.17.0]
- NPM version: [e.g. 6.14.13]
Additional context
Using NODE_ENV=development npm run storybook:serve crashes on Systems using the Git Bash running on Windows 10 / 11.