mirror of
https://github.com/smartxworks/sunmao-ui.git
synced 2024-11-21 03:15:49 +08:00
transform ES modules in node_modules
This commit is contained in:
parent
2d7d22a9f8
commit
bdd12a3d09
@ -5,4 +5,14 @@ module.exports = {
|
||||
collectCoverage: Boolean(process.env.COVERAGE),
|
||||
collectCoverageFrom: ['<rootDir>/src/**/*.ts?(x)'],
|
||||
coveragePathIgnorePatterns: ['generated'],
|
||||
/**
|
||||
* Since we use a lot of denepencies as ES moules, we need configure
|
||||
* jest to transform the files in node_modules which export as
|
||||
* ES modules.
|
||||
* The list can be very long if we enumerate dependencies as a whitelist,
|
||||
* so we use a blacklist to ignore certain dependencies that should
|
||||
* not be transformed.
|
||||
* This may cause performance issue.
|
||||
*/
|
||||
transformIgnorePatterns: [`/node_modules/(jest|@testing-library)`],
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user