I tested uploading my angular component to bit.dev with bit add (component.html, component.css, component.ts), bit tag, bit export. I got it uploaded and the code would be shown but the component would not load on the site. I looked for a compiler working for this type of code but could not find any. How do I get this working?
Hi, there are some limitations for reusing Angular components.
At the moment it is impossible to build/test an Angular component without the context of a project. This is a limitation forced by the Angular compiler. Only the future release of Ivy will fix it.
We have discussed it with the Angular team, and the workaround that they found is not to use a compiler at all.
You can track and share the source files of the components, and import them to other projects, and let the consuming project handle the compilation process of the code, as part of the project's build.
It should also work if you use npm i for uncompiled components in Bit, as ng compiles code found in the node_modules dir.
As for rendering support - we are working to extend the playground support for additional frameworks. Angular is next in line (alongside Vue). I hope it will be done and shipped in the next few weeks.
Most helpful comment
Hi, there are some limitations for reusing Angular components.
At the moment it is impossible to build/test an Angular component without the context of a project. This is a limitation forced by the Angular compiler. Only the future release of Ivy will fix it.
We have discussed it with the Angular team, and the workaround that they found is not to use a compiler at all.
You can track and share the source files of the components, and import them to other projects, and let the consuming project handle the compilation process of the code, as part of the project's build.
It should also work if you use
npm ifor uncompiled components in Bit, as ng compiles code found in thenode_modulesdir.As for rendering support - we are working to extend the playground support for additional frameworks. Angular is next in line (alongside Vue). I hope it will be done and shipped in the next few weeks.