chrome-aws-lambda
chrome-aws-lambda copied to clipboard
Change dynamic imports to static imports to fix bundling with ESBuild
ESBuild does not allow dynamic imports, thus throwing errors when reaching the require import changed by this PR. At runtime, the require looks for the file in whichever directory we are in (__dirname).
The changes proposed were tested and work both for Webpack and ESBuild.
@alixaxel This is a very small change, can we please merge this? Pretty please 🙏? I don't want to fork 😅
+1 to this
This fix is required for Webpack 5 with ts-loader as well it looks like. +1 for merging this!