Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getJSMainModuleName automatically adds .js #22347

Closed
atrauzzi opened this issue Nov 19, 2018 · 3 comments
Closed

getJSMainModuleName automatically adds .js #22347

atrauzzi opened this issue Nov 19, 2018 · 3 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@atrauzzi
Copy link

atrauzzi commented Nov 19, 2018

Environment

  React Native Environment Info:
    System:
      OS: Windows 10
      CPU: (8) x64 Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
      Memory: 6.39 GB / 15.94 GB
    Binaries:
      Yarn: 1.12.1 - C:\Users\atrauzzi\AppData\Roaming\npm\yarn.CMD
      npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

Description

I'm using TypeScript in my project, so if I want to change my entrypoint, setting getJSMainModuleName to the path of a TypeScript file (with a .ts or .tsx extension) results in something like src/Path/To/File.ts.js.

Reproducible Demo

Any generic React Native project with TS configured. Edit here.

@rickhanlonii
Copy link
Member

Hey @atrauzzi, thanks for filing - this file has to be a javascript file, we can't use a typescript file for this

@atrauzzi
Copy link
Author

@rickhanlonii - Why not just resolve it as a module and let babel take care of what you get?

@rickhanlonii
Copy link
Member

@atrauzzi in prod, when this code is run this code has already been transpiled so you couldn't require the ts.

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants