Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

268
Visualizações
Astro Js @font-face import build wrong replacement

I'm building an Astro Js project, I wan't to import a css file (for icons) from a dependency which include their own font files :

// @icons/dist/.../index.css
@font-face {
    font-family: "font name";
    src: url("./icons.ttf") format("truetype"),
url("./icons.woff") format("woff"),
url("./icons.woff2") format("woff2");
}

When building I have a replacement which is not including the font file in the dist folder, the compiled css :

@font-face {
    font-family: 'font name';
    src: url(__VITE_ASSET__e6e97650__$_?6cdb7df3dc807c5592752bbd5d1c724e__) format('truetype'),
        url(__VITE_ASSET__bc194da8__$_?6cdb7df3dc807c5592752bbd5d1c724e__) format('woff'),
        url(__VITE_ASSET__c837e718__$_?6cdb7df3dc807c5592752bbd5d1c724e__) format('woff2');
}

Does anyone had this issue and know how to resolve it ?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If icons.ttf is inside the public folder, the url should be: url("/icons.ttf")

Basically you need to remove the dot so it target the public folder instead of the folder where you have the CSS file.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda