summaryrefslogtreecommitdiff
path: root/patches/@vue+vue3-jest+29.2.3.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/@vue+vue3-jest+29.2.3.patch')
-rw-r--r--patches/@vue+vue3-jest+29.2.3.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/patches/@vue+vue3-jest+29.2.3.patch b/patches/@vue+vue3-jest+29.2.3.patch
new file mode 100644
index 00000000000..3b0ced98400
--- /dev/null
+++ b/patches/@vue+vue3-jest+29.2.3.patch
@@ -0,0 +1,22 @@
+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',