mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-07-17 17:21:48 +00:00
Add support for loading files from Google Drive
#vibecoded
This commit is contained in:
14
tests/import_meta_transformer.js
Normal file
14
tests/import_meta_transformer.js
Normal file
@@ -0,0 +1,14 @@
|
||||
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);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user