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

166
Vistas
Import files without adding .jsx at the end not working

I am working on a react project in which I have imported .jsx files without adding the extension .jsx at the end. But while I was trying to incorporate typescript files. It stopped identifying files unless the extension is added at the import statement.

import Item from "./Item"
//not working

import Item from "./Item.jsx"
//working

How can I fix this? where could the problem be? I use create-react-app

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

First of all, you have to add typescript into your project if you want to incorporate it. Now for the extension problem, you can add a webpack.config.js file and include the following in it:

{
    module.exports = {
        entry: './index.tsx',
        resolve: {
            extensions: ['', '.js', '.jsx', '.tsx']
        }
    }
}

this will enable you to import files without extensions.

about 4 years 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 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