[Vuejs]-Command "npm run build" not creating the correctely build on VueJS project

0👍

From package.json, you can see

npm run serve : it’s running vue-cli-service serve which starts a dev server.

https://cli.vuejs.org/guide/cli-service.html#vue-cli-service-serve

npm run build : it’s running vue-cli-service build which produces a production-ready bundle .

https://cli.vuejs.org/guide/cli-service.html#vue-cli-service-build

You may have different setting in dev and production and caused page difference.

0👍

i think it’s about of your project config of publicPath, it’s '/' default,
you can see the doc: Configuration Reference | Vue CLI

Leave a comment