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
- [Vuejs]-Vue.js routes send to 404 on refresh
- [Vuejs]-How do I access the data in this dynamic import?
Source:stackexchange.com