microsoft / microsoft/TypeScript

Add support for extesnsions in js files like .native.js, .web.js, .android.js and .ios.js

Open
#44,001 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

I am working on a react native web project where file extensions can be .js, .native.js, .web.js, .android.js and .ios.js. I would like to know how i can make vscode detect files with such extension in path intellisense when i cmd+click on file path in import statement. If path resolve to multiple files it should show a picker to choose one.

Would like to know if i can configure it in vscode or any extension that can help. I have been searching it for long and can't find any solution. Maybe vscode could provide it out of the box just like webstorm.

Also could not find any help on stackoverflow
stackoverflow question

I know i can use jsconfig.json compilerOptions for custom path resolving using baseUrl and path parameters. But i want to add custom extensions here. Hope my question is clear

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked Stack Overflow question and tracing TypeScript's module-resolution behavior for JavaScript imports; the issue names no repository file or test to begin with. Confirm whether custom extensions belong in configuration or require language-service support, then verify that .native.js, .web.js, .android.js, and .ios.js imports resolve and that ambiguous matches offer a picker.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native, typescript, vscode
Domain
developer-experience, tooling, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.