"vue-cli-service build --mode staging" not minifying app.js
See original GitHub issueVersion
3.0.1
Node and OS info
Node 10.6.0 / npm 6.4.0 / Windows 10
Steps to reproduce
vue-cli-service build --mode staging
What is expected?
Split CSS from JS, and minify everything.
What is actually happening?
app.js to large
I use vue-cli-service build , CSS and JS are minify, I hope to use vue-cli-service build --mode staging, css and JS are also minify, what should I do?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
mode staging not working · Issue #3541 · vuejs/vue-cli - GitHub
When running vue-cli-service , environment variables are loaded from all corresponding files. If they don't contain a NODE_ENV variable, it will ...
Read more >Modes and Environment Variables - Vue CLI
vue -cli-service build --mode staging builds a production app in staging mode, using .env , .env.staging and .env.staging.local if they are ...
Read more >npm run build --mode [.env.mode] not working as expected
As expected, running the command npm run build --mode staging is to give a production build with variable as listed in the .env.staging...
Read more >Custom Build Modes with Vue CLI 3 | Rangle.io
In our case, we want to create a build mode for staging. To build our app in staging mode, we'd run the following...
Read more >How To Use Vue.js Environment Modes with a Node.js Mock ...
A mode is an environment type, or a set of variables that gets loaded during a build. These variables are stored in .env...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Then add it.
NODE_ENV=productionis required for packaging purpose.Have you included this line in
.env.staging?: