We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 713c5a6 commit bd9a7c4Copy full SHA for bd9a7c4
src/template/pug.js
@@ -1,6 +1,7 @@
1
export default async function (template, extras, options) {
2
const pug = require('pug')
3
- const compiler = pug.compile(template, { filename: extras.id, ...options.pug })
+ const trim = typeof template === 'string' ? template.trim : template
4
+ const compiler = pug.compile(trim, { filename: extras.id, ...options.pug })
5
6
return compiler({css: extras.modules || {}})
7
}
test/fixtures/pug.vue
@@ -1,5 +1,5 @@
<template lang="pug">
-div(class=css.test class='keep-me') foo
+ div(class=css.test class='keep-me') foo
</template>
<script lang="babel">
0 commit comments