question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"vue-cli-service build --mode staging" not minifying app.js

See original GitHub issue

Version

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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sodateacommented, Aug 23, 2018

Then add it. NODE_ENV=production is required for packaging purpose.

1reaction
sodateacommented, Aug 23, 2018

Have you included this line in .env.staging?:

NODE_ENV=production
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found