mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
* Prototype TS plugins on web This prototype allows service plugins to be loaded on web TSServer Main changes: - Adds a new host entryPoint called `importServicePlugin` for overriding how plugins can be loaded. This may be async - Implement `importServicePlugin` for webServer - The web server plugin implementation looks for a `browser` field in the plugin's `package.json` - It then uses `import(...)` to load the plugin (the plugin source must be compiled to support being loaded as a module) * use default export from plugins This more or less matches how node plugins expect the plugin module to be an init function * Allow configure plugin requests against any web servers in partial semantic mode * Addressing some comments - Use result value instead of try/catch (`ImportPluginResult`) - Add awaits - Add logging * add tsserverWeb to patch in dynamic import * Remove eval We should throw instead when dynamic import is not implemented * Ensure dynamically imported plugins are loaded in the correct order * Add tests for async service plugin timing * Update src/server/editorServices.ts Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> * Partial PR feedback * Rename tsserverWeb to dynamicImportCompat * Additional PR feedback Co-authored-by: Ron Buckton <ron.buckton@microsoft.com> Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
15 lines
405 B
JSON
15 lines
405 B
JSON
{
|
|
"files": [],
|
|
"include": [],
|
|
"references": [
|
|
{ "path": "./shims" },
|
|
{ "path": "./tsc" },
|
|
{ "path": "./tsserver" },
|
|
{ "path": "./typingsInstaller" },
|
|
{ "path": "./watchGuard" },
|
|
{ "path": "./debug" },
|
|
{ "path": "./cancellationToken" },
|
|
{ "path": "./dynamicImportCompat" },
|
|
{ "path": "./testRunner" }
|
|
]
|
|
} |