Description
swc-angular-plugin is an SWC plugin that adds Angular support to SWC, the fast JavaScript and TypeScript compiler. SWC does not handle Angular's extra transforms even when Angular runs in JIT (just-in-time) mode, so this plugin fills that gap. It rewrites Component.templateUrl into Component.template, turns styleUrls and styleUrl into Component.styles, and adds the metadata that input(), output() and viewChild() need. The plugin is meant to be used in tests, typically through the swc-angular Jest presets from the same project, and it needs the JIT compiler to work. The project is explicit that it is not a replacement for the Angular compiler and should not be used to build production applications. The source sits in the jscutlery devkit repository on GitHub.…
Highlights
- Rewrites templateUrl into an inline template
- Converts styleUrls and styleUrl into inline styles
- Adds metadata for input(), output() and viewChild()
- Runs inside SWC, the fast JavaScript and TypeScript compiler
- Intended for tests, not production builds
Ratings & Reviews
No ratings yet
Be the first to rate swc-angular-plugin.
People also visit
swc-angular-plugin FAQ
What is this plugin for?
It is an SWC plugin that makes SWC understand Angular components. Without it, SWC compiles TypeScript fast but misses the Angular transforms the framework needs.
Can I use it to build my app?
No. The project says it is suitable for testing and should not be used to build production applications, because it is not a replacement for the Angular compiler.
What does it need to work?
It needs Angular's JIT (just-in-time) compiler. For Jest tests, the companion swc-angular package provides the presets that use this plugin.
Which Angular features does it handle?
It converts templateUrl and styleUrls or styleUrl into inline template and styles, and adds metadata for input(), output() and viewChild().
Where is the source code?
It is in the jscutlery devkit repository on GitHub, in the packages/swc-angular-plugin folder.
What are the best swc-angular-plugin alternatives?
Popular alternatives to swc-angular-plugin include swc-angular, @ngneat/svg-icon and @jscutlery/playwright-ct-angular. See all swc-angular-plugin alternatives



















