Skip to content

Commit

Permalink
fix: empty require cache on dynamic require
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed May 20, 2021
1 parent 9780a4f commit b1ef924
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/core/src/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export const dynamicRequire = (filePath: string): any => {
ts.sys.writeFile(fileName, data);
});
try {
delete require.cache[jsFilePath];
//we are forcing module: commonjs
const result = require(jsFilePath);
return result;
Expand Down

0 comments on commit b1ef924

Please sign in to comment.