Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

189
Vistas
vite build does not produce javascript file in dist folder

I am trying to deploy my vanilla JS app to Firebase hosting. I am using Vite as a build tool.

When I run it locally, it works fine. But when I deploy it to Firebase hosting, I realized that it was missing main.js file.

I checked my dist folder generated by Vite, and it was indeed missing main.js file.

I never ran into this issue before when using JS framework, but now I am with Vanilla JS.

How can I make sure that my build will contain javascript file as well?

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Your script tag should look like this :

<script src="./main.js" type="module"></script>

There must be an attribute :

type="module"
7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.