Skip to content

Commit e15a930

Browse files
committed
fix: enable html doctype by default for pug
close #894
1 parent 6e4870c commit e15a930

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Diff for: packages/@vue/cli-service/lib/Service.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ module.exports = class Service {
2525
this.loadEnv()
2626

2727
const userOptions = this.loadProjectOptions(projectOptions)
28-
this.projectOptions = Object.assign(defaults(), userOptions)
28+
const defaultOptions = defaults()
29+
this.projectOptions = Object.assign({}, defaultOptions, userOptions, {
30+
vueLoader: Object.assign(defaultOptions.vueLoader, userOptions.vueLoader)
31+
})
2932

3033
debug('vue:project-config')(this.projectOptions)
3134

Diff for: packages/@vue/cli-service/lib/options.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ exports.defaults = () => ({
5555
compiler: false,
5656

5757
// vue-loader options
58-
vueLoader: {},
58+
vueLoader: {
59+
template: {
60+
// for pug
61+
doctype: 'html'
62+
}
63+
},
5964

6065
// sourceMap for production build?
6166
productionSourceMap: true,

0 commit comments

Comments
 (0)