Skip to content

Commit 0a2d9c4

Browse files
committed
feat: support pug as html template
closes vuejs#3646
1 parent b460b67 commit 0a2d9c4

File tree

1 file changed

+15
-4
lines changed
  • packages/@vue/cli-service/lib/config

1 file changed

+15
-4
lines changed

packages/@vue/cli-service/lib/config/base.js

+15-4
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,21 @@ module.exports = (api, options) => {
130130

131131
webpackConfig.module
132132
.rule('pug')
133-
.test(/\.pug$/)
134-
.use('pug-plain-loader')
135-
.loader('pug-plain-loader')
136-
.end()
133+
.test(/\.pug$/)
134+
.oneOf('pug-vue')
135+
.resourceQuery(/vue/)
136+
.use('pug-plain-loader')
137+
.loader('pug-plain-loader')
138+
.end()
139+
.end()
140+
.oneOf('pug-template')
141+
.use('raw')
142+
.loader('raw-loader')
143+
.end()
144+
.use('pug-plain')
145+
.loader('pug-plain-loader')
146+
.end()
147+
.end()
137148

138149
// shims
139150

0 commit comments

Comments
 (0)