#No loader is configured for ".woff" files (using Fontsource)

2 messages · Page 1 of 1 (latest)

carmine hollow
#

Hello,

I'm in the process of migrating our Storybook from 6.5 to 7.0 with React and Vite and am having the same issue as mentioned in #1082263483049070624 message

X [ERROR] No loader is configured for ".woff" files: node_modules/@fontsource/work-sans/files/work-sans-all-400-normal.woff

    node_modules/@fontsource/work-sans/400.css:7:81:
      7 │   src: url('./files/work-sans-vietnamese-400-normal.woff2') format('woff2'), url('./files/work-sans-all-400-normal.woff') format('woff');
        ╵                                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

However, we're using Fontsource dependencies, so for us it isn't as easy to just delete the .woff files. Just to test if it would work, I added '.woff': 'dataurl' to the list of loaders in builder-manager in my own node_modules folder and it works perfectly, but of course this isn't a long-term solution.

Does anyone have a suggestion?

carmine hollow
#

Anyone? 😊 I'd be happy to submit a pull request that adds .woff to the list of loaders in builder-manager if there's no other option.