Skip to content

Commit

Permalink
build: avoid require call to consolidate in esm-browser build
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Sep 5, 2021
1 parent fa5b583 commit 12acf51
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/compiler-sfc/src/compileTemplate.ts
Expand Up @@ -119,6 +119,8 @@ export function compileTemplate(
const preprocessor = preprocessLang
? preprocessCustomRequire
? preprocessCustomRequire(preprocessLang)
: __ESM_BROWSER__
? undefined
: require('consolidate')[preprocessLang as keyof typeof consolidate]
: false
if (preprocessor) {
Expand Down

0 comments on commit 12acf51

Please sign in to comment.