1 contributor
Like
Install angular as a package?
Copied
npm i @bit/bit.envs-dev.compilers.angular
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
Angular
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
modifieddraft
chevron_left
chevron_right
Bit-Angular Compiler
Bit environment for transpiling Angular components according to the Angular Package Format. Beneath the surface, this Bit compiler uses ng-packagr.
This compiler does not support relative paths between components, and assumes module paths (i.e.
@bit/<name>
). If your components use relative paths, you should use version0.2.0
of the Angular compiler. See explanation here.
Installation
Install in your project using the following command:
bit import bit.envs/angular -c
How to use?
Build your components after tracking them using bit build.
bit build
You can configure the typescript compiler using the rawConfig as follow (add it in the compiler configuration or in overrides):
"env": {
"compiler": {
"bit.envs/compilers/angular": {
"rawConfig": {
"tsconfig": {
"compilerOptions": {
//your options can go here
}
}
}
}
}
}
Contents
- The compiler uses @angular 9 and ng-packagr v9 for building.
- Compiler adds
webpack-env >= 0.8.0
andtslib >= 1.0.0
- The compiler creates an ng-package.json file, if one does not exist. Otherwise, it will use the existing one.
- The compiler does not create an entry file (such as
public-api.ts
), and assumes the component has one. The entry file of the component should be marked as the main file.