-
由 Illya Klymov 创作于
* use custom compiler for webpack and jest * move :key inside <template v-for> * fix bug with v-once and v-for
由 Illya Klymov 创作于* use custom compiler for webpack and jest * move :key inside <template v-for> * fix bug with v-once and v-for
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。
@vue+vue3-jest+29.2.3.patch 830 B
diff --git a/node_modules/@vue/vue3-jest/lib/process.js b/node_modules/@vue/vue3-jest/lib/process.js
index a8d1c5c..a6b2036 100644
--- a/node_modules/@vue/vue3-jest/lib/process.js
+++ b/node_modules/@vue/vue3-jest/lib/process.js
@@ -108,12 +108,17 @@ function processTemplate(descriptor, filename, config) {
(descriptor.script && descriptor.script.lang)
const isTS = /^typescript$|tsx?$/.test(lang)
+ const compiler = typeof vueJestConfig.compiler === 'string'
+ ? require(vueJestConfig.compiler)
+ : vueJestConfig.compiler
+
const result = compileTemplate({
id: filename,
source: template.content,
filename,
preprocessLang: template.lang,
preprocessOptions: vueJestConfig[template.lang],
+ compiler,
compilerOptions: {
bindingMetadata: bindings,
mode: 'module',