node_modules font-face url can not resolve
See original GitHub issueDescribe the bug
My project using a node_modules dependency that have a css file. The css file font-face url can not resolve but i see the docs that assetsInclude default include these file types.
Reproduction
error: No loader is configured for “.woff” files error: No loader is configured for “.woff2” files error: No loader is configured for “.ttf” files
System Info
vite version: ^2.7.2
Operating System: MacOS Big Sur 11.5.1
Node version: 12.18.2
Used Package Manager
yarn
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Error: Can't resolve" for @font-face url with relative path · Issue ...
My solution for now was to create css instead of scss files for importing fonts from relative paths, and add the import of...
Read more >Build error with Nuxt 2.15.7 - Can't resolve a CSS @font-face ...
Make sure your filenames and directories are correct and match. Double check the URLs. Note that, Unix based OSs are case sensitive.
Read more >Module not found: Error: Can't resolve - sage - Roots Discourse
I am getting this error when running npm run dev ✘ Module not found: Error: Can't resolve '. ... @font-face { font-family: 'Buffalo';...
Read more >Loading Fonts with webpack - Chris Courses
Without the necessary configuration in place, trying to load a font-face with webpack is going to throw an error that says something along ......
Read more >Using web fonts with SASS and Webpack - Varya Stepanova
node_modules /resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--5-3!./src/styles.scss) Module not found: Error: Can't resolve ' ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The same is happening to us trying to import an ‘.svg’ file from the node_modules. It doesn’t happen when building the application.
ERROR: No loader is configured for ".svg" files: node_modules/@wonderflow/icons/dist/sprite.svg
Hello @HenryNer. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with
need reproduction
will be closed if they have no activity within 3 days.