Fail the build if any referenced file is not being found #86
Replies: 1 comment
-
Hi—Thanks for posting this! _tw's build process is as straightforward as possible, so it doesn't move files referenced in your CSS files (like something like webpack might); you need to put them in the appropriate location in your In your example above, you'll want to move your I will also say that I'm not sure about the effect of applying sans serif and monospace fonts on the same element; I think one would be selected over the other. I'll convert this to a discussion in case you have any other questions! |
Beta Was this translation helpful? Give feedback.
-
Is it possible to have the build commands like
npm run build
andnpm run prod
fail is any referenced file is not found? (instead of silently continuing without including the missing files)for instance it should fail the build if
src: url('@fonts/geist/GeistVariableVF.woff2') format('woff2');
file which is being referenced is not present.In the existing fonts.css I tried to use some custom fonts like this
but they don't look like being applied -
My folder structure is like this
I also declared the fonts in tailwind.config.js like this
and then in header.php I have this
but visually the fonts doesn't look like being applied.
How I can debug this? How I can be sure if fonts are being applied or not? (just looking at the output website is not 100% obvious, some fallback similar font could be used instead)
P.S - I used a very similar approach to include the same fonts in another existing (static) website and I know that the above steps are supposed to work (minus the few differences related with _tw build process)
Beta Was this translation helpful? Give feedback.
All reactions