Skip to content

Commit

Permalink
Update packages/next/build/jest/jest.ts
Browse files Browse the repository at this point in the history
Co-authored-by: JJ Kasper <jj@jjsweb.site>
  • Loading branch information
balazsorban44 and ijjk committed Nov 16, 2022
1 parent a332085 commit 1b8940c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/next/build/jest/jest.ts
Expand Up @@ -155,9 +155,10 @@ export default function nextJest(options: { dir?: string } = {}) {

transformIgnorePatterns: [
// To match Next.js behavior node_modules is not transformed, only `transpiledPackages`
...(transpiled ? [
`/node_modules/(?!(${transpiled}))/`,
`/node_modules/.pnpm/(?!(${transpiled.replace(/\//g, '\\+')})@)`,

] : ['/node_modules/'])
// CSS modules are mocked so they don't need to be transformed
'^.+\\.module\\.(css|sass|scss)$',

Expand Down

0 comments on commit 1b8940c

Please sign in to comment.