mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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.
18 lines
559 B
TypeScript
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);
|
|
};
|