Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change dynamic imports to static imports to fix bundling with ESBuild #239

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

belvederef
Copy link

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.

@rehanvdm
Copy link

rehanvdm commented Jan 3, 2022

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

@ACPixel
Copy link

ACPixel commented Feb 12, 2022

+1 to this

@deldrid1
Copy link

deldrid1 commented Mar 7, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants