Using Vue’s default scripts:
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
I run “npm run build” it produces the production build in the “dist” directory however in the end it says:
Images and other types of assets were omitted.
I honestly don’t understand what to do include them. I don’t want to make a specific folder for images and upload so my web server can serve it. Vue should handle the files in its src/assets folder itself.
So far I have found a solution while googling which says to include:
NODE_ENV = PRODUCTION
But it doesn’t work either.
Any clues how to get this fixed? I cannot launch a website without including its logo.
2
Answers
I believe that message just means that they are omitted from the file listing displayed in the console during the build.
Nope. They are omitted from build. My page is "broken" if I use
npm run build
and then serve it through DJango.Doing
npm run serve
it will produce the right files in the django’s static folders, and then, serving it from django (w npm server stopped) will work.