fix(vue-loader): enable minimize for production builds

awaiting for vuejs/vue-loader#1208
This commit is contained in:
Pooya Parsa 2018-03-23 22:02:47 +04:30
parent 4e2d40f2ce
commit 3859ad6e15
2 changed files with 13 additions and 12 deletions

View File

@ -117,7 +117,18 @@ export default class WebpackBaseConfig {
{ {
test: /\.vue$/, test: /\.vue$/,
loader: 'vue-loader', loader: 'vue-loader',
options: _.cloneDeep(this.options.build.vue) options: Object.assign({
minimize: !this.options.dev,
template: {
doctype: 'html' // For pug, see https://github.com/vuejs/vue-loader/issues/55
},
transformAssetUrls: {
video: 'src',
source: 'src',
object: 'src',
embed: 'src'
}
}, this.options.build.vueLoader)
}, },
{ {
test: /\.jsx?$/, test: /\.jsx?$/,

View File

@ -63,17 +63,7 @@ export default {
babel: { babel: {
babelrc: false babelrc: false
}, },
vue: { vueLoader: {},
template: {
doctype: 'html' // For pug, see https://github.com/vuejs/vue-loader/issues/55
},
transformAssetUrls: {
video: 'src',
source: 'src',
object: 'src',
embed: 'src'
}
},
postcss: {}, postcss: {},
templates: [], templates: [],
watch: [], watch: [],