Skip to content

require(...).createTransformer is not a function #348

Open
@YunFeng-Huang

Description

@YunFeng-Huang

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/vue-jest/lib/utils.js b/node_modules/vue-jest/lib/utils.js
index 2949ed2..92694ee 100644
--- a/node_modules/vue-jest/lib/utils.js
+++ b/node_modules/vue-jest/lib/utils.js
@@ -73,8 +73,7 @@ const getTsJestConfig = function getTsJestConfig(config) {
   if (!isUsingTs) {
     return null
   }
-
-  const createTransformer = require('ts-jest').createTransformer
+  const { createTransformer } = require('ts-jest')
   const tr = createTransformer()
   const configSet = tr.configsFor(config)
   const tsConfig = configSet.typescript || configSet.parsedTsConfig

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    jest 27upstreamDue to other packages (like Jest)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions