We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Dynamic require of "<filename>" is not supported
chrome62
We're trying out "splitting: true" using the ESM output format.
Our build currently targets chrome62.
When we enable splitting, I get the following error when the dynamic import is attempted:
Try changing "chrome62" to "chrome63" here: https://esbuild.github.io/try/#YgAwLjIwLjIALS1idW5kbGUgLS1vdXRkaXI9ZGlzdC8gLS1zcGxpdHRpbmcgLS1mb3JtYXQ9ZXNtIC0tdGFyZ2V0PWNocm9tZTYyAGUAZW50cnkuanMAY29uc3QgZjEgPSAoKSA9PiB7CiAgY29uc3QgeCA9IGltcG9ydCgnLi9maWxlLmpzJyk7CiAgY29uc29sZS5sb2coIngiLCB4KTsKfQoKZjEoKTsAAGZpbGUuanMAZXhwb3J0IGRlZmF1bHQgNDI7
Notice that in the "chrome62" version, the dynamic require is done via __require from the esbuild runtime.
__require
esbuild
You can try running the "chrome62" version in a browser, you will see the Dynamic require ... error.
Dynamic require ...
Dynamic imports work when targeting chrome62, or a build-time error is generated (e.g. "dynamic imports / splitting not supported on this target")
The code is split into multiple chunks, however the code produced cannot actually dynamically import those chunks.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
We're trying out "splitting: true" using the ESM output format.
Our build currently targets
chrome62
.When we enable splitting, I get the following error when the dynamic import is attempted:
Steps to reproduce
Try changing "chrome62" to "chrome63" here:
https://esbuild.github.io/try/#YgAwLjIwLjIALS1idW5kbGUgLS1vdXRkaXI9ZGlzdC8gLS1zcGxpdHRpbmcgLS1mb3JtYXQ9ZXNtIC0tdGFyZ2V0PWNocm9tZTYyAGUAZW50cnkuanMAY29uc3QgZjEgPSAoKSA9PiB7CiAgY29uc3QgeCA9IGltcG9ydCgnLi9maWxlLmpzJyk7CiAgY29uc29sZS5sb2coIngiLCB4KTsKfQoKZjEoKTsAAGZpbGUuanMAZXhwb3J0IGRlZmF1bHQgNDI7
Notice that in the "chrome62" version, the dynamic require is done via
__require
from theesbuild
runtime.You can try running the "chrome62" version in a browser, you will see the
Dynamic require ...
error.Expected result
Dynamic imports work when targeting
chrome62
, or a build-time error is generated (e.g. "dynamic imports / splitting not supported on this target")Actual result
The code is split into multiple chunks, however the code produced cannot actually dynamically import those chunks.
The text was updated successfully, but these errors were encountered: