Standardize on index.ts entry points#2040
Conversation
Tracked in b/535315569
There was a problem hiding this comment.
Code Review
This pull request standardizes the entry point configuration across several Angular packages and samples by transitioning from public-api.ts to index.ts. Feedback on these changes suggests explicitly appending /index to the export statement in renderers/angular/src/index.ts to ensure robust module resolution and avoid potential failures in strict ESM environments or specific bundler configurations.
josemontespg
left a comment
There was a problem hiding this comment.
Keep the public_api.ts files for backwards compatibility. Apps might be importing directly from public_api.ts and we don't want those imports to break.
You may keep lean public_api.ts files that just reexport everything from index.ts, with a comment saying that the public_api.ts file is there for the purpose of backwards compatibility.
josemontespg
left a comment
There was a problem hiding this comment.
Are there any public_api.ts files to refactor in web_core or other web adapters, like lit and react? Apply the refactor in those as well.
|
Regarding keeping |
|
Regarding refactoring |
Standardize on index.ts entry points.
What
public_api.tsstyle entry point files toindex.tsacross Angular packages.package.json,tsconfig.json, etc.).renderers/angular/src/index.tsto explicitly exportv0_8/indexinstead ofv0_8.Why
/indexto ensure robust resolution in strict ESM environments.Effect
/indexexport prevents potential resolution failures.Testing