Skip to content

Conversation

@billti
Copy link
Member

@billti billti commented Mar 10, 2016

This is a hot issue for VSCode. Effectively, with no config file provided, we don't resolve CommonJS modules in JavaScript files.

The issue is that although allowNonTsExtensions is set by default, allowJs currently isn't, and when nodeModuleNameResolver is called, it only resolves files with supportedExtensions. If allowJs isn't set, then .js isn't in the set of file extensions it looks for.

This is a one line change in tsserver only, so should not impact VS. (We should decide if getDefaultCompilerOptions in services.ts should set this by default also, but this is the minimal/least risk change for now).

@RyanCavanaugh
Copy link
Member

👍

@mhegazy
Copy link
Contributor

mhegazy commented Mar 10, 2016

👍

billti added a commit that referenced this pull request Mar 10, 2016
AllowJS files in tsserver when no project is given
@billti billti merged commit e668835 into release-1.8 Mar 10, 2016
@billti billti deleted the issue7292 branch March 10, 2016 19:18
@egamma
Copy link
Member

egamma commented Mar 10, 2016

thanks much!

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants