Open ChrisLFieldsII opened 8 months ago
Thanks @ChrisLFieldsII for bringing this to our attention. I’ll have someone on the team who’s more familiar with Storybook look into this.
We are running into this issue as well when using local fonts in index.css
:
@font-face {
font-family: 'Sen-Regular';
src: local('Sen-Regular'), url(/fonts/Sen/Sen-Regular.ttf) format('truetype');
}
Also bumped into this while upgrading from RW 4.5.0 to 6.6.4. Possible root cause: https://github.com/bholloway/resolve-url-loader/issues/212
yarn redwood storybook-vite
works fine (after updating to RW 7.7.0 and then migrating Storybook to Vite), however yarn redwood storybook
may only be fixable via tsconfig enabling generation of source-maps for css files for any folks wanting to stick to webpack.
What's not working?
Adding something like
import "@fontsource-variable/inter";
to thestorybook.preview.js
causes a build error regarding no sourcemaps forresolve-url-loader
.This worked in previous versions of Redwood.
I tried to do some digging into the webpack.common.js but couldn't find a solution.
How do we reproduce the bug?
Clone this repo and run
yarn rw storybook
.It should show an error at build time like the one attached above.
What's your environment? (If it applies)
Are you interested in working on this?