-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to build not minified files using @vue/cli #4328
Comments
// vue.config.js
module.exports = {
chainWebpack: config => config.optimization.minimize(false)
} |
@sodatea 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)} |
And how about preventing minification of HTML? |
It's minified by the html-webpack-plugin so pass an option to it |
Ah thanks @sodatea , sort of works... but still minifies component HTML. I added the following to
The result is that everything outside of I'm using the prerender-spa-plugin as recommended here to prerender the app to static HTML files. The default for the prerender is to not minify, but I also tried explicitly setting this to false but had no effect. |
Version
3.9.3
Environment info
Steps to reproduce
npm run build
What is expected?
js not be minified
What is actually happening?
js always minified
how can i modify optimization.minimizer to disable minify by default
The text was updated successfully, but these errors were encountered: