Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

147
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda