-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(angular): fix Coveo headless error on application run #193
Conversation
Pull Request Report PR Title ✅ Title follows the conventional commit spec. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way we modify the tsconfig.json seems odd to me.
Can't we as a schematic author act upon the tsconfig in a less roundabout way?
I was wondering especially after reading this page from Angular documentation:
Your library needs a custom Typescript configuration file with instructions on how to compile your schematics into your distributed library.
https://angular.io/guide/schematics-for-libraries#building-your-schematics
mmh.. I think that custom tsconfig file is only used in the schematic compilation rather than being applied to the generated project. |
Another approach might be to just If that works, I'd prefer this one. Otherwise these kind of problem will keep popping up from time to time. |
Do you know if we can detect if we're generating or adding the project?
I think we should also try to see what would be the impact of both on the customer project, what does he win or lose. Tho, if the issue is pressing, we can also proceed with a fix-it twice logic: Fix it with the proposed changes here (it works fine really), and investigate afterwards to see what's the 'best' fix. (Personnaly, I locked the headless version to 0.10.0 for my test) |
Yes, we can detect if we are adding or updating a file. However in this case, I'm pretty sure we will always be updating the file. @olamothe, |
https://coveord.atlassian.net/browse/CDX-280
Proposed changes
I updated the angular
tsconfig.json
file to include theallowSyntheticDefaultImports
flag. Otherwise thenpm start
command leads to an error (see image).Note:
All other templates (React and Vue) have the
allowSyntheticDefaultImports
flag in theirtsconfig.json
.Testing
This is already covered by current E2E tests.
CDX-280