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

170
Vistas
Why can't I use the typescript transpiled javascript code

I am learning TypeScript and the code that I transpiler cannot use because of an error in the html, it is this:

Error in console

I'm trying to use transpiled code on my html

html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script type="module" src="./dist/app.js"></script>
</html>

my directory:

Directory

package.json:

{
  "name": "ts",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "MIT"
}

tsconfig.json:

{
  "compilerOptions": {
    "target": "es5", 
     "moduleResolution": "classic",                       
     "outDir": "./dist",  
    "esModuleInterop": true,                             
    "forceConsistentCasingInFileNames": true,          
    "strict": true,                                    
    "skipLibCheck": true                               
  }
}

As you can see is very simple but I don't really understand why I can't, I search for a time and I saw something about module loaders, and build tools, but I don't catch it, and I don't know how implement them.

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