A
A
Alexander2017-07-26 07:53:02
webpack
Alexander, 2017-07-26 07:53:02

How to enable production mode in vue.js?

Deployed vue.js with webpack and vue-loader using vue-cli. And I didn’t quite understand how to enable production mode.
Here ( https://ru.vuejs.org/v2/guide/deployment.html ) it is written to use the DefinePlugin, but it is not clear to me in which file this should be written.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kulakov, 2017-07-26
@LordGuard

vue-cli with webpack template contains everything you need. Just run npm run build, this script will set the environment variable to production and make a production version in the dist folder.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question