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
Besides the duplicated sourceMappingURL emit within cjs output, it shouldn't have any real impact for consumers, as we use sourcesContent which is a source of truth for the actual source mapping.
More feedback is needed.
Actionable for now is to reduce that duplicate emit for commonjs.
Logs
No response
Requested priority
Normal
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
The provided reproduction is a minimal reproducible example of the bug.
Library
React Components / v9 (@fluentui/react-components)
Are you reporting Accessibility issue?
None
Reproduction
Pre swc (using TS):
Post swc:
esm map: https://unpkg.com/@fluentui/[email protected]/lib/Body1.js.map
cjs map: https://unpkg.com/@fluentui/[email protected]/lib-commonjs/Body1.js.map
sourceMappingURLpresent within the source map as wellcjs: https://unpkg.com/@fluentui/[email protected]/lib-commonjs/Body1.js
Bug Description
Actual Behavior
After migration to swc, source maps for commonjs inputs don't point to TS original source anymore.
Also the
sourceMappingURLis being printed twice within cjs output (which is present within the source map )Expected Behavior
This regression is actually expected, but we didn't thought about it while implementing the change, as our transpilation pipeline changed
From
graph LR; S["Start"] E["End"] B["Babel"] S-->TSC:esm-->B S-->TSC:cjs-->B B-->E;To
graph LR; S["Start"] E["End"] B["Babel"] S-->SWC:esm-->B-->SWC:cjs-->EBesides the duplicated
sourceMappingURLemit within cjs output, it shouldn't have any real impact for consumers, as we usesourcesContentwhich is a source of truth for the actual source mapping.More feedback is needed.
Actionable for now is to reduce that duplicate emit for commonjs.
Logs
No response
Requested priority
Normal
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations
Related issues/PRs
#27250