chrome-aws-lambda icon indicating copy to clipboard operation
chrome-aws-lambda copied to clipboard

Change dynamic imports to static imports to fix bundling with ESBuild

Open belvederef opened this issue 4 years ago • 3 comments

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.

belvederef avatar Sep 16 '21 08:09 belvederef

@alixaxel This is a very small change, can we please merge this? Pretty please 🙏? I don't want to fork 😅

rehanvdm avatar Jan 03 '22 14:01 rehanvdm

+1 to this

ACPixel avatar Feb 12 '22 04:02 ACPixel

This fix is required for Webpack 5 with ts-loader as well it looks like. +1 for merging this!

deldrid1 avatar Mar 07 '22 02:03 deldrid1