1

This answer states that npm run build creates a dist folder (it does in my case) as well as an index.html file - it doesn't in my case.

Instead I have an index.html file inside my dist folder, and I upload this folder to my remote server, visiting that index.html in my browser displays a blank page with "Hello world" on top (no CSS, no JS).

I couldn't find anything addressing this issue in the docs.

Am I missing something? Why is my app reduced to a mere "Hello world" page once deployed?

drake035
  • 3,955
  • 41
  • 119
  • 229
  • Check your console for errors (e.g., `404`s for missing files). Also verify you're actually looking at your Vue app by checking the source panel. – tony19 Jan 28 '19 at 22:04

1 Answers1

0

If you are using vue-cli, to create dist folder you need to run npm run build. Also , open your package.json and check your scripts objects. It will have various commands to run and you can chose the correct script to run.

"scripts": {
 "serve": "vue-cli-service serve",
 "build": "vue-cli-service build",
 "lint": "vue-cli-service lint"
},

For vue cli3, mostly you need to run npm run build.

sridhar..
  • 1,945
  • 15
  • 19
  • Gosh I'm sorry, I wanted to write `build` not `serve`. I did run `npm run build`, not `npm run serve`. I updated my question. – drake035 Jan 28 '19 at 12:48