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

192
Visualizações
React automatically importing all the CSS

So I'm doing a React App, Where the css files remains on src/dist/css, where src is located in the same local of App.js, the thing is I just want to import one single CSS file, but when I'm going to see every css file were automatically imported somehow.

I want to prevent this, because it's conflicting with the normal css screen.

These are the only things I'm Importing. ( IMAGE )

But All of these are being imported, I don't know if is something with React or the Server.. ( IMAGE )

EDIT: I figured out its because of React Router, Who is importing all the CSS to the App.JS, Still don't know how to prevent this.

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

0

There is no way to prevent this. Alternatives that you can look at are:

  1. use BEM naming to have no conflicts all over the code.
  2. use module.css, CSS module is a simple thing that can help you resolve the conflict without changing much of the CSS you have written.
about 4 years ago · Juan Pablo Isaza Relatório

0

i recommend you using styled-components or module.css. and tailwind also.

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