fix(storybook): remove custom-babel-loader workaround#36385
Draft
PaulGMardling wants to merge 2 commits into
Draft
fix(storybook): remove custom-babel-loader workaround#36385PaulGMardling wants to merge 2 commits into
PaulGMardling wants to merge 2 commits into
Conversation
📊 Bundle size report✅ No changes found |
|
Pull request demo site: URL |
| @@ -0,0 +1,127 @@ | |||
| --- | |||
There was a problem hiding this comment.
🕵🏾♀️ visual changes to review in the Visual Change Report
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png | 413 | Changed |
vr-tests-react-components/Positioning 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png | 52 | Changed |
| vr-tests-react-components/Positioning.Positioning end.chromium.png | 761 | Changed |
vr-tests-react-components/ProgressBar converged 3 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png | 67 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png | 58 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png | 127 | Changed |
vr-tests-react-components/TagPicker 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/TagPicker.disabled - Dark Mode.disabled input hover.chromium.png | 658 | Changed |
| vr-tests-react-components/TagPicker.disabled - High Contrast.disabled input hover.chromium.png | 1319 | Changed |
vr-tests/Callout 8 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/Callout.Bottom right edge.default.chromium.png | 1130 | Changed |
| vr-tests/Callout.Beak 25.default.chromium.png | 2198 | Changed |
| vr-tests/Callout.Right top edge.default.chromium.png | 1126 | Changed |
| vr-tests/Callout.Root.default.chromium.png | 2195 | Changed |
| vr-tests/Callout.Left bottom edge.default.chromium.png | 3182 | Changed |
| vr-tests/Callout.Top center.default.chromium.png | 2127 | Changed |
| vr-tests/Callout.Top left edge.default.chromium.png | 2212 | Changed |
| vr-tests/Callout.Top right edge.default.chromium.png | 1146 | Changed |
vr-tests/Keytip 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/Keytip.Root.default.chromium.png | 55 | Changed |
vr-tests/react-charting-LineChart 4 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/react-charting-LineChart.Events - RTL.default.chromium.png | 15 | Changed |
| vr-tests/react-charting-LineChart.Multiple.default.chromium.png | 192 | Changed |
| vr-tests/react-charting-LineChart.Events.default.chromium.png | 17 | Changed |
| vr-tests/react-charting-LineChart.Events - Dark Mode.default.chromium.png | 16 | Changed |
vr-tests/react-charting-MultiStackBarChart 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/react-charting-MultiStackBarChart.Basic_Absolute.default.chromium.png | 359 | Changed |
There were 4 duplicate changes discarded. Check the build logs for more information.
d45ca4a to
86d7d33
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous Behavior
swc-loader passes sourcemaps to subsequent Webpack loaders as raw JSON strings (the native output format of SWC). When the react-storybook-addon-export-to-sandbox post-loader ran babel-loader on story files, babel-loader forwarded that string directly to Babel core, which only accepts boolean | object | undefined for inputSourceMap — causing the build
Error: Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: .inputSourceMap must be a boolean, object, or undefined
A custom wrapper custom-babel-loader.ts was introduced to intercept the call and parse the string before passing it to babel-loader.
New Behavior
parseMap: true.
This tells swc-loader to parse its output sourcemap to an object before passing it downstream, so all subsequent loaders receive an object instead of a string. babel-loader can then be used directly in the addon's webpack rule — no custom wrapper needed.
custom-babel-loader.ts is deleted.
Related Issue(s)
#32290