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

766
Visualizações
Semantic ui React css file not compiling/working with webpack 5

I am making a basic CRA app and wanted to use semantic-ui i followed the steps to the same but as soon as I import the CSS file in the index.js the app starts compiling and finishes it with two errors i dont know what I am doing wrong.

Here are the errors being shown

Cannot read properties of undefined (reading 'get')
during rendering of asset asset/inline|data:application/x-font-ttf;charset=utf-8

https://i.stack.imgur.com/YHqyU.png
https://i.stack.imgur.com/iR1z0.png

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

0

The main reason for this is an extra ";" at line 19990 of semantic.css If removed, everything goes fine. In the 'semantic-ui-css/semantic.min.css' remove the extra ';'.

@font-face {
    font-family: 'Step';
    src: url(data:application/x-font-ttf;charset=utf-8;;base64,AAEAAAAOAIAAAw...
} 
about 4 years ago · Juan Pablo Isaza Relatório

0

I found working solution https://github.com/Semantic-Org/Semantic-UI/issues/7073#issuecomment-1001074430

The error is likely to caused by double semicolons in semantic.min.css

Temporary (but not quite good) solution: add sed -i 's/;;/;/g' node_modules/semantic-ui-css/semantic.min.css && in front of your start/build script in package.json

about 4 years ago · Juan Pablo Isaza Relatório

0

If you don't want to take on the burden of installing a "patch package" as described on the GitHub issue, you could alternatively run the same hacky code locally as a custom webpack loader:

src/css-preloader.js

module.exports = function(source) {
  return source.replace(/;;/g, ';');
}

then update your webpack.config.js as follows:

{
    test: /\.css$/,
    use: [
        'style-loader',
        'css-loader', 
        path.resolve('src/css-preloader.js')
    ],
}
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