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

241
Visualizações
Using webpack and react × becomes × with minification

I'm using webpack.optimize.UglifyJsPlugin() to minify my React code.

This is my render function

return (
    <div id='columnPicker' className='modal fade' tabIndex='-1' role='dialog'>
        <div className='modal-dialog modal-sm' role='document'>
            <div className='modal-content'>
                <div className='modal-header'>
                    <button type='button' className='close' data-dismiss='modal'>&times;</button>
                    <h4 className='modal-title'>Column Picker</h4>
                </div>
                <div className='modal-body'>
                    <ul className='list-group'>
                        {listItems}
                    </ul>
                </div>
                <div className='modal-footer'>
                    <div className='pull-right'>
                        <button type='button' className='btn btn-sm btn-primary' data-dismiss='modal' onClick={props.onSave}>Save</button>
                    </div>
                    <div className='pull-right'>
                        <button type='button' className='btn btn-link' data-dismiss='modal'>Cancel</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
);

The close button uses &times but when it actually renders I see

<button type="button" class="close" data-dismiss="modal">×</button>

If I remove webpack.optimize.UglifyJsPlugin() it renders as one would expect. Does anyone know how to fix this?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Specifying the charset in the HTML will preserve the correct character.

Try adding <meta charset="UTF-8"/> (or whatever charset) to the meta tag on your html file.

over 4 years ago · Santiago Trujillo Relatório

0

I've just had the same issue using angular-cli (V2.4.6). In this case the problem only happens in production mode.

Angular-cli uses webpack internally but provides no access to which options are used in production vs development mode.

Adding <meta charset="UTF-8"/> also worked for me.

over 4 years ago · Santiago Trujillo 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