Skip to content

AllowJS files in tsserver when no project is given - #7466

Merged
Bill Ticehurst (billti) merged 1 commit into
release-1.8from
issue7292
Mar 10, 2016
Merged

Bill Ticehurst (billti) merged 1 commit into
release-1.8from
issue7292

Conversation

@billti

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

👍

@mhegazy

Copy link
Copy Markdown
Contributor

👍

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

Copy link
Copy Markdown
Member

thanks much!

@microsoft 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.

5 participants