7

I wanna the production code is not minified in dist/ with @vue/cli 4.1.2

1、first try set vue.config.js

module.exports = {
  chainWebpack: config => {
  config.optimization.minimize(false)
  }
}

and then other parts is normal, but the inline script still be minified.

var Appvue_type_template_id_7a951895_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":"app"}},[_c('img',{attrs:{"alt":"Vue logo","src":__webpack_require__("cf05")}}),_c('HelloWorld',{attrs:{"msg":"Welcome to Your Vue.js App"}})],1)}

2、 second try

use dev mode vue-cli-service build --mode development

but the code format is eval(...)

flyflydogdog
  • 307
  • 3
  • 10

1 Answers1

-1

have a try to delete the plugin like: config.optimization.minimizers.delete(name) vue inspect --plugins to check plugin names maybe terser?

VincentGuo
  • 247
  • 2
  • 9