Skip to content

Utilize bundler-ready Vue distribution

Mike Greiling requested to merge fix-vue-production-build into master

What does this MR do?

Swaps out vue/dist/vue.js for vue/dist/vue.common.js which is a bundler-friendly distribution of Vue that doesn't hard-code environment variables. The pertinent line is the following:

vue.js

  devtools: "development" !== 'production',

vue.common.js

  devtools: process.env.NODE_ENV !== 'production',

The former is hard-coded for a development environment because devtools will always be true. The latter will change based on the compiled environment provided by webpack, and the dead code ([Vue warn] and other console errors) will be stripped out in production.

Are there points in the code the reviewer needs to double check?

All builds should pass and webpack should compile successfully. (The bundles which include Vue code should be a little bit lighter as well)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Related: #27530 (closed)

Merge request reports