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 used yarn to add fontsource to my project. My project is Jekyll, so static site generator. I notice a node_module entry for fontsource. I have a build script that builds my CSS based on using Tailwind. My build script has a single import for fontsource such as:
@import "@fontsource/cooper-hewitt";
This generates an error in my build due to the css not being found. The build expects source to be in /assets/css so the mistake is in trying to find /assets/css/files/cooper-hewitt/index.css etc.
There has to be a way for me to import without having this issue. I solved it by manually copying the /files directory from node_modules to /assets/css. Is that really the secret sauce? Manual copying of files? I am not sure why the PostCSS builder phase fails to look in the node_modules, but that seems to be the problem? I have the latest PostCSS and PostCSS-import packages.
Any hot tips on how to manually build with fontsource ?
The text was updated successfully, but these errors were encountered:
I'm not too familiar with PostCSS, but I believe it's not built like a bundler such as Webpack that can process things in node_modules.
#133 is a future solution for you, however, it is something that someone would need to pick up since I personally don't have plans on taking on that workload.
I used yarn to add fontsource to my project. My project is Jekyll, so static site generator. I notice a node_module entry for fontsource. I have a build script that builds my CSS based on using Tailwind. My build script has a single import for fontsource such as:
This generates an error in my build due to the css not being found. The build expects source to be in /assets/css so the mistake is in trying to find /assets/css/files/cooper-hewitt/index.css etc.
There has to be a way for me to import without having this issue. I solved it by manually copying the /files directory from node_modules to /assets/css. Is that really the secret sauce? Manual copying of files? I am not sure why the PostCSS builder phase fails to look in the node_modules, but that seems to be the problem? I have the latest PostCSS and PostCSS-import packages.
Any hot tips on how to manually build with fontsource ?
The text was updated successfully, but these errors were encountered: