Skip to content

Commit

Permalink
feat: support template pre-processors
Browse files Browse the repository at this point in the history
close #17
  • Loading branch information
yyx990803 committed May 4, 2020
1 parent 95f6ff9 commit b6cafee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/node/serverPluginVue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,14 @@ function compileSFCTemplate(
filename: filePath,
inMap: template.map,
transformAssetUrls: {
// @ts-ignore
base: path.posix.dirname(publicPath)
},
compilerOptions: {
scopeId: scoped ? `data-v-${hash_sum(publicPath)}` : null,
runtimeModuleName: '/@modules/vue'
}
},
preprocessLang: template.lang,
preprocessCustomRequire: (id: string) => require(resolve(root, id))
})

if (errors.length) {
Expand Down

0 comments on commit b6cafee

Please sign in to comment.