I encountered the issue below in a ts meteor project. Could you advice what to do?
Thanks
I have a project with
.tsand.tsxfiles and I am trying to import a.tsxfile from a.tsfile, like so:src/index.ts
import WriteEditor from './write_editor';src/write_editor.tsx
import Events from './events'; import Actions from './actions'; export default class WriteEditor extends React.Component { /*...*/ }Now TypeScript tells me
ERROR in ./src/index.ts
Module not found: Error: Can’t resolve ‘./write_editor’ in ‘/Users/luke/Projekte/writejs/code/writejs/src’
@ ./src/index.ts 3:23-48
@ multi ./src/index.tsSo I tried this:
src/index.ts
import WriteEditor from './write_editor.tsx';Now my IDE tells me not to write the extensions
tsxand I get an errors in src/write_editor.tsx because TypeScript cannot find my.tsfiles from a.tsxfile.Then I went to rename the imports and added the
.tsextensionsimport Events from './events.ts'; import Actions from './actions.ts';Now I am getting tons or errors telling me not to write extensions at all.
So how can we import
tsxfromtsand vice versa?