You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few key VS Code extensions — such as IntelliCode — are powered by TS Server plugins. Currently we don't support loading these plugins at all on web versions of TypeScript
This feature request tracks enabling plugins from extensions on vscode.dev and GitHub.dev. We don't plan to support plugins from the workspace since these require running npm install
At the moment VS Code doesn't even try to initialize plugins with the server. However once I remove this check on the VS Code side, the code starts failing at require not being implemented:
I've cleaned up my prototype in #47377 quite a bit. Noteworthy changes:
Plugins are now only loaded if they have a browser field in their package.json
Plugins are loaded using import(...) in web
Plugins on web must be compiled to a module that can be imported
I think web enabled plugins are good opportunity to move plugins to adopt modern JS practices. Trying to load plugins synchronously on web is also very ugly as my original prototype showed
Activity
mjbvz commentedon Jan 11, 2022
At the moment VS Code doesn't even try to initialize plugins with the server. However once I remove this check on the VS Code side, the code starts failing at
requirenot being implemented:TypeScript/src/webServer/webServer.ts
Line 139 in c0796c1
mjbvz commentedon Jan 11, 2022
I wonder if we need a browser version of these plugins too, similar to what VS Code does for extensions in browsers
Prototyping TS Server plugins on web
mjbvz commentedon Feb 16, 2022
I've cleaned up my prototype in #47377 quite a bit. Noteworthy changes:
browserfield in theirpackage.jsonimport(...)in webI think web enabled plugins are good opportunity to move plugins to adopt modern JS practices. Trying to load plugins synchronously on web is also very ugly as my original prototype showed
leti367 commentedon Jun 16, 2022
Thanks all for the help. Ron Buckton (@rbuckton) Since this change is already merged, do you have any idea when would this be available?
RyanCavanaugh commentedon Jun 16, 2022
PRs merged today will be in the nightly build starting immediately the following day, and also in 4.8 Beta (plus any subsequent release)