A
A
Alianos2021-03-23 23:23:42
Vue.js
Alianos, 2021-03-23 23:23:42

How to compile release version of vue 2 cli project?

Hello, as you know, we can run the project with the npm run serve command, but how to compile the project? That is, if you enter the command npm run serve in dist, a project will appear, but there will be comments in the js code, some map files (what they do), in addition, trying to open index.html locally, the browser will only show an empty screen, how to make the compiled project can be launched by opening index.html?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mikeyuri, 2021-03-24
@mikeyuri

npm run build (if specified in scripts)
npx vue-cli-service build (directly)
https://cli.vuejs.org/en/guide/cli-service.html#vu...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question