Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to compile with PostCSS #402

Closed
resistorsoftware opened this issue Dec 20, 2021 · 2 comments
Closed

How to compile with PostCSS #402

resistorsoftware opened this issue Dec 20, 2021 · 2 comments
Labels
question Further information is requested

Comments

@resistorsoftware
Copy link

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 ?

@resistorsoftware resistorsoftware added the needs triage Issues and pull requests that need triage attention label Dec 20, 2021
@ayuhito
Copy link
Member

ayuhito commented Dec 20, 2021

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.

@ayuhito ayuhito added question Further information is requested and removed needs triage Issues and pull requests that need triage attention labels Dec 20, 2021
@ayuhito
Copy link
Member

ayuhito commented Dec 26, 2021

I'll close this as #133 really is the most ideal solution for this if anyone ever chooses to pick that up.

@ayuhito ayuhito closed this as completed Dec 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants