You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As indicated in the ESBuild documentation, ESbuild is able to tree shake a JSON import when we use named imports.
Unfortunately, named imports for JSON files are now an outdated feature in JS engines.
A JSON file must now be imported as a default import and with an import attribute.
ESbuild could recognize standard JSON imports and tree shake them.
As indicated in the ESBuild documentation, ESbuild is able to tree shake a JSON import when we use named imports.
Unfortunately, named imports for JSON files are now an outdated feature in JS engines.
A JSON file must now be imported as a default import and with an import attribute.
ESbuild could recognize standard JSON imports and tree shake them.
Given the following code:
And assuming that
version
is set to1.0.0
inpackage.json
, ESbuild could output the following bundled code:The text was updated successfully, but these errors were encountered: