Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tests/unit/workerFactory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ let workerTerminated = false;

const Module = require('module');

// Hack for import.meta.env
// TSX does not polyfill import.meta.env out of the box when evaluating imported modules.
// Provide a polyfill for import.meta.env to prevent crashes during TSX evaluation.
// We intercept compilation of workerFactory to inject the polyfill at the top of the file.
const originalCompile = Module.prototype._compile;
Module.prototype._compile = function(content: string, filename: string) {
Expand Down
Loading