Logo
Explore Help
Sign In
iSharkFly-Docs/angular-docs-cn
1
0
Fork 0
You've already forked angular-docs-cn
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
angular-docs-cn/packages/compiler-cli/linker/babel/index.ts

12 lines
364 B
TypeScript
Raw Normal View History

refactor(compiler-cli): linker - add Babel plugin, FileLinker and initial PartialLinkers (#39116) This commit adds the basic building blocks for linking partial declarations. In particular it provides a generic `FileLinker` class that delegates to a set of (not yet implemented) `PartialLinker` classes. The Babel plugin makes use of this `FileLinker` providing concrete classes for `AstHost` and `AstFactory` that work with Babel AST. It can be created with the following code: ```ts const plugin = createEs2015LinkerPlugin({ /* options */ }); ``` PR Close #39116
2020-10-03 19:59:53 +01:00
/**
* @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.io/license
*/
fix(compiler-cli): expose the linker as a Babel plugin (#41918) This allows the linker to be used as a true Babel plugin. In a Babel configuration file, include the linker as follows: ```js { plugins: [ '@angular/compiler-cli/linker/babel', ] } ``` or, if you need to specify configuration options: ```js { plugins: [ ['@angular/compiler-cli/linker/babel', {linkerJitMode: true}], ] } ``` PR Close #41918
2021-04-29 23:22:35 +02:00
import {defaultLinkerPlugin} from './src/babel_plugin';
export {createEs2015LinkerPlugin} from './src/es2015_linker_plugin';
export default defaultLinkerPlugin;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 134ms Template: 6ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API