build: avoid require call to consolidate in esm-browser build
This commit is contained in:
parent
fa5b583ba5
commit
12acf5102c
@ -119,6 +119,8 @@ export function compileTemplate(
|
|||||||
const preprocessor = preprocessLang
|
const preprocessor = preprocessLang
|
||||||
? preprocessCustomRequire
|
? preprocessCustomRequire
|
||||||
? preprocessCustomRequire(preprocessLang)
|
? preprocessCustomRequire(preprocessLang)
|
||||||
|
: __ESM_BROWSER__
|
||||||
|
? undefined
|
||||||
: require('consolidate')[preprocessLang as keyof typeof consolidate]
|
: require('consolidate')[preprocessLang as keyof typeof consolidate]
|
||||||
: false
|
: false
|
||||||
if (preprocessor) {
|
if (preprocessor) {
|
||||||
|
Loading…
Reference in New Issue
Block a user