microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
100.4k stars 12.41k forks source link

Rename ".tsx" to ".jsx" in import statements #7012

Closed tomitrescak closed 8 years ago

tomitrescak commented 8 years ago

Hi, when I compile a ts file which contains following imports

import Navigations from './navigations.tsx';

it outputs exactly the same line

import Navigations from './navigations.tsx';

This breaks the code in the browser. I would expect that "tsx" import will be renamed to "jsx"

import Navigations from './navigations.jsx';

Is this somehow achievable? Thanks

PS: I am using meteor, not webpack, which does not resolve imports like import Navigations from './navigations';

vladima commented 8 years ago

shouldn't it be the issue for meteor to resolve module names without extensions?

tomitrescak commented 8 years ago

Unfortunatelly it is not the case. Only ".js" files are resolved without extension, ".jsx" gets left behind.

mhegazy commented 8 years ago

looks like a duplicate of https://github.com/Microsoft/TypeScript/issues/4595