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

615
Visualizações
Vite.js Import js file 'as is'

With Vite.js, is there an option to load the javascript file 'as is'? Without any transformations, minifying and without injecting something like import"./_commonjsHelpers.80d8c10d.js" to the beginning of the file.

I need an analogue of loading the raw script and just including it in the browser, like doing this with the simple <script> tag.

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

0

Try adding the following plugin to vite.config.js:

plugins: [{
    name: 'static-js',
    apply: 'serve',
    enforce: 'pre',
    resolveId(source, importer) {
      if (source.endsWith('_commonjsHelpers.80d8c10d.js')) {
        return '\ufeff' + source;
      }
    }
}]
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