MCPcopy Index your code
hub / github.com/angular/components / createLinkerEsbuildPlugin

Function createLinkerEsbuildPlugin

scripts/create-legacy-tests-bundle.mjs:169–186  ·  view source on GitHub ↗

Plugin that links node modules using the Angular compiler CLI.

()

Source from the content-addressed store, hash-verified

167
168/** Plugin that links node modules using the Angular compiler CLI. */
169function createLinkerEsbuildPlugin() {
170 return {
171 name: 'ng-link-esbuild',
172 setup: build => {
173 build.onLoad({filter: /fesm2022/}, async args => {
174 const filePath = args.path;
175 const content = await fs.promises.readFile(filePath, 'utf8');
176 const {code} = await babel.transformAsync(content, {
177 filename: filePath,
178 compact: false,
179 plugins: [['@angular/compiler-cli/linker/babel', {linkerJitMode: true}]],
180 });
181
182 return {contents: code};
183 });
184 },
185 };
186}
187
188main().catch(e => {
189 console.error(e);

Callers 1

mainFunction · 0.85

Calls 1

readFileMethod · 0.80

Tested by

no test coverage detected