mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
Add better support for pug
When using `lang="pug"`, passing Boolean `true` as prop and using directives will case errors. See: https://github.com/vuejs/vue-loader/issues/693 https://github.com/vuejs/vue-loader/issues/55 For example: ```html <template lang="pug"> foo( bar v-baz-directive ) </template> ``` This will be rendered as `<foo bar="bar" v-baz-directive="v-baz-directive">` and cause errors such as `bar expected Boolean but got String` and `v`/`baz`/`directive` not defined.
This commit is contained in:
parent
61111c87f0
commit
97076fa649
@ -20,6 +20,10 @@ export default function ({ isClient }) {
|
||||
'stylus': styleLoader.call(this, 'stylus', 'stylus-loader'),
|
||||
'styl': styleLoader.call(this, 'stylus', 'stylus-loader')
|
||||
},
|
||||
template: {
|
||||
// for pug, see https://github.com/vuejs/vue-loader/issues/55
|
||||
doctype: "html"
|
||||
},
|
||||
preserveWhitespace: false,
|
||||
extractCSS: extractStyles.call(this)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user