Skip to content

[Issue with @swc/jest] exclude property being ignored #86

@JJBocanegra

Description

@JJBocanegra

I have a .swcrc file that has a exclude like

"exclude": [
    "src/tests",
    "src/migrations",
    "\\..*spec\\.ts$"
  ]

because I don't want the build to have the test files, but when trying to replace the exclude in the jest.config.ts file like this

transform: {
    '^.+\\.(t|j)s$': ['@swc/jest', {
      ...swcConfig,
      sourceMaps: 'inline',
      exclude: [],
    }],
  },

When running the tests everything fails due to this error

cannot process file because it's ignored by .swcrc

If I remove the exclude from the .swcrc file everything works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions