Closed Boshskoski closed 1 year ago
The Angular team does not support custom build configurations, but a quick glance at your webpack config reveals an issue with the test
query: it selects .d.ts files whereas it should be targeting .js/.mjs files as documented.
@JoostK I tried also with .js/.mjs files. Why it does not support when on the documentation page they show example how can we deal with partially compiled librararies ? That is why I use @angular/compiler-cli/linker/babel
The Angular linker is supported, but integrations in custom Webpack configurations is not. StackOverflow is a more appropriate platform for troubleshooting Webpack configuration issues.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
Yes
Description
My application is using external library from our company. That library internally is using these two libraries
https://www.npmjs.com/package/@ng-select/ng-select?activeTab=readme https://www.npmjs.com/package/@ng-select/ng-option-highlight
We used angular version 10. Then we had not compilation time issues. We maked update to version 12. After our update I got JIT compilation unavailable. I debugged the problem and I saw that the problem is in this two libraries because their compilationMode is set to 'partial'.
https://github.com/ng-select/ng-select/blob/master/src/ng-option-highlight/tsconfig.lib.json https://github.com/ng-select/ng-select/blob/master/src/ng-select/tsconfig.lib.json
So i tried using angular linker for that
@angular/compiler-cli/linker/babel
as mentioned in the documentationhttps://angular.io/guide/creating-libraries#consuming-partial-ivy-code-outside-the-angular-cli
But it is not working and I got error when i try that. I am not able to reproduce the issue on other custom created angular 12 project which directly installs these two dependencies.
The company library name is xcomponent-angular. In addition I am attaching files from my application
So my application and the other library from the company are using same angular version. When they build the project and upload they don't get this JIT compilation time error. But when I use their library I am getting this error after I build my application and I upload on production. Locally the ng build is passing and don't give me any errors, so it happens only when I upload the build.
files.zip
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response