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
I'm having trouble building Storybook with the S2 style macro. Specifically, I'm having issues when using @storybook/addon-webpack5-compiler-babel, but NOT with @storybook/addon-webpack5-compiler-swc. When running storybook dev, I get an error like this:
[webpack-dev-middleware] wait until bundle finished
ERROR in ./stories/S2Test.jsx
Module build failed (from ./node_modules/.pnpm/babel-loader@9.2.1_@babel+core@7.26.7_webpack@5.97.1_@swc+core@1.10.14_@swc+helpers@0.5.15__esbuild@0.24.2_/node_modules/babel-loader/lib/index.js):
Error: .inputSourceMap must be a boolean, object, or undefined
at Object.loadPartialConfigAsync (/Users/logan/storybook-react-webpack-s2/node_modules/.pnpm/@babel+core@7.26.7/node_modules/@babel/core/src/config/index.ts:45:61)
at Object.loader (/Users/logan/storybook-react-webpack-s2/node_modules/.pnpm/babel-loader@9.2.1_@babel+core@7.26.7_webpack@5.97.1_@swc+core@1.10.14_@swc+helpers@0.5.15__esbuild@0.24.2_/node_modules/babel-loader/lib/index.js:116:30)
at Object.<anonymous> (/Users/logan/storybook-react-webpack-s2/node_modules/.pnpm/babel-loader@9.2.1_@babel+core@7.26.7_webpack@5.97.1_@swc+core@1.10.14_@swc+helpers@0.5.15__esbuild@0.24.2_/node_modules/babel-loader/lib/index.js:39:12)
@ ./stories/S2Test.stories.js 1:0-34 4:13-19
@ ./stories/ lazy ^\.\/.*$ include: (?%21.*node_modules)(?:\/stories(?:\/(?%21\.)(?:(?:(?%21(?:^%7C\/)\.).)*?)\/%7C\/%7C$)(?%21\.)(?=.)[^/]*?\.stories\.(js%7Cjsx%7Cmjs%7Cts%7Ctsx))$ chunkName: [request] namespace object ./S2Test.stories.js ./S2Test.stories
@ ./storybook-stories.js 23:11-27:5
@ ./storybook-config-entry.js 6:0-50 17:31-39 24:2-27:4 24:58-27:3 26:31-39
preview compiled with 1 error
=> Failed to build the preview
I think this is related to unplugin-parcel-macros, because without it I don't get this error (but I can't use the style macro).
Provide a general summary of the issue here
I'm having trouble building Storybook with the S2 style macro. Specifically, I'm having issues when using
@storybook/addon-webpack5-compiler-babel
, but NOT with@storybook/addon-webpack5-compiler-swc
. When runningstorybook dev
, I get an error like this:I think this is related to
unplugin-parcel-macros
, because without it I don't get this error (but I can't use the style macro).I created a minimal repro here: https://github.com/loganzartman/storybook-react-webpack-s2
and the minimal diff to break it is here: loganzartman/storybook-react-webpack-s2@82b1e13
I stepped into the debugger a bit, and I see that
inputSourceMap
seems to contain a JSON string instead of a JS object:🤔 Expected Behavior?
Successful Storybook build of code with S2 style macro, when using Webpack + Babel
😯 Current Behavior
Error containing
.inputSourceMap must be a boolean, object, or undefined
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
git clone https://github.com/loganzartman/storybook-react-webpack-s2
pnpm i
pnpm storybook
Version
@react-spectrum/s2@0.6.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Mac OS
🧢 Your Company/Team
Adobe/Home
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: