angular/packages/language-service/plugin-factory.ts
Charles Lyding 1fa7879cfd refactor(language-service): delegate plugin initialization to bundle
Updates the plugin factory to directly invoke the 'initialize' function from the
Angular Language Service bundle. This replaces manual proxying and lazy-loading
logic with direct delegation, unifying the instantiation process within the bundle.
2026-02-02 11:07:06 -08:00

18 lines
559 B
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// Note: use a type-only import to prevent TypeScript from being bundled in.
import type ts from 'typescript';
export const factory: ts.server.PluginModuleFactory = (mod) => {
const {initialize}: {initialize: ts.server.PluginModuleFactory} = require(
`@angular/language-service/bundles/language-service.js`,
)(mod);
return initialize(mod);
};