Closed
Description
Version
3.0.4
Reproduction link
https://github.com/jost-s/vue-cli3-demo
Node and OS info
Node 8.10.0 / npm 6.4.1 / Windows 8.1
Steps to reproduce
- Clone repository
- Run
.\node_modules\.bin\vue-cli-service build --mode test
- Check
./dist
folder - Set NODE_ENV to "test"
- Run
npm run build
- Check
./dist
folder
What is expected?
Create a build including all files
What is actually happening?
Create a build omitting additional images and css files.
At first I ran in to this issue because I deployed an app to a test system where the NODE_ENV
was set to "test". Building resulted in an incomplete dist folder without images and css files, even though the output said "Building for production...".
After trying different combinations of environment variables and webpack modes, it turns out the problem is two-fold:
- When building in "test" mode, the images and css files are omitted.
- When setting
NODE_ENV = test
, it looks like production mode is used, yet css and image assets are omitted from the build.
This issue is related to #2327