mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-07-17 17:21:48 +00:00
15 lines
508 B
JavaScript
15 lines
508 B
JavaScript
const { TsJestTransformer } = require('ts-jest');
|
|
const defaultTransformer = new TsJestTransformer();
|
|
|
|
module.exports = {
|
|
process(sourceText, sourcePath, options) {
|
|
if (sourceText.includes('import.meta.env')) {
|
|
sourceText = sourceText.replace(/import\.meta\.env/g, 'process.env');
|
|
}
|
|
return defaultTransformer.process(sourceText, sourcePath, options);
|
|
},
|
|
getCacheKey(sourceText, sourcePath, options) {
|
|
return defaultTransformer.getCacheKey(sourceText, sourcePath, options);
|
|
}
|
|
};
|