Skip to content

Cannot configure CSS output paths, so all fonts and images don't resolve... #16759

Answered by wongjn
davidde asked this question in Help
Discussion options

You must be logged in to vote

Paths should be relative to the assets/css/tailwind-output.css file, like:

@font-face {
  …
  src: url(../fonts/foo.woff2);
}

Or

<div class="bg-[url(../images/hero.webp)]">

Or if the project folder is served as the root of the host (i.e. http://localhost:3000/main.html):

@font-face {
  …
  src: url(/assets/fonts/foo.woff2);
}

Or

<div class="bg-[url(/assets/images/hero.webp)]">

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@davidde
Comment options

Answer selected by davidde
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants