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

156
Visualizações
how to move all js package <script> tags from index.html into a single js file

I am trying to move my webEngage script into another file, so I can pass it as an entry point in my webpack. Here is what I already have in my index.ejs

<head>
 <meta charset="utf-8" />
 <meta
   name="viewport"
   content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"
 />
 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>

<!-- ICONS SPRITE -->
<div style="display: none">
  <% if (htmlWebpackPlugin.files.sprites) { for (var spriteFileName in
  htmlWebpackPlugin.files.sprites) { %> <%=
  htmlWebpackPlugin.files.sprites[spriteFileName] %> <% } } %>
</div>
<div id="root"></div>
<noscript>
  scripts is disabled, please enable javascript and try again!
</noscript>

<!-- WebEngage Script -->
<script id="_webengage_script_tag" type="text/javascript">
  var webengage;
  !(function(w, e, b, n, g) {
    function o(e, t) {
      e[t[t.length - 1]] = function() {
        r.__queue.push([t.join('.'), arguments]);
      };
    }
    .
    .
    .
  })(window, document, 'webengage');
</body>

I was thinking of declaring an IIFE in a scripts.js file, but it didn't work. I would appreciate your help in advance

about 4 years ago · Juan Pablo Isaza
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