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
With the sample project below, SWC is injecting imports for a shim function in order to provide public class fields to more browsers, but they are not being bundled into the output.
The output file out.js should incorporate any helper functions that SWC chooses to include for browser compatibility, since I explicitly requested Parcel to include all node modules via includeNodeModules.
馃槸 Current Behavior
With the current browserslist, swc fetches the helper function @swc/helpers/lib/_define_property.js, but it is treated as an external module.
馃拋 Possible Solution
This might be heavily related with the bug reported in #8401. The example above also reproduces it. The difference is that I do not expect any imports nor requires in the output.
馃敠 Context
I am building a commonjs module which is expected to be consumed by a browser after some post-processing (i.e. module bundling done at run-time). Any attempt at calling require or import in the output is undesirable. In this use case the main expectation is for Parcel to bundle any helper functions that SWC introduces for whichever reason.
馃捇 Code Sample
src/index.js:
exportdefaultclassFoo{seqNumber=0;}
馃實 Your Environment
Software
Version(s)
Parcel
2.7.0
Node
16.16.0
npm/Yarn
npm 8.11.0
Operating System
Windows 11
The text was updated successfully, but these errors were encountered:
馃悰 bug report
With the sample project below, SWC is injecting imports for a shim function in order to provide public class fields to more browsers, but they are not being bundled into the output.
馃帥 Configuration (package.json)
馃 Expected Behavior
The output file out.js should incorporate any helper functions that SWC chooses to include for browser compatibility, since I explicitly requested Parcel to include all node modules via
includeNodeModules
.馃槸 Current Behavior
With the current browserslist,
swc
fetches the helper function@swc/helpers/lib/_define_property.js
, but it is treated as an external module.馃拋 Possible Solution
This might be heavily related with the bug reported in #8401. The example above also reproduces it. The difference is that I do not expect any
import
s norrequire
s in the output.馃敠 Context
I am building a commonjs module which is expected to be consumed by a browser after some post-processing (i.e. module bundling done at run-time). Any attempt at calling
require
orimport
in the output is undesirable. In this use case the main expectation is for Parcel to bundle any helper functions that SWC introduces for whichever reason.馃捇 Code Sample
src/index.js
:馃實 Your Environment
The text was updated successfully, but these errors were encountered: