Open mkszepp opened 5 months ago
Is there any reason why template-registry.js was added in publicEntrypoints? Can we safely remove?
Mostly in that it's the easiest way to convert a template-registry.ts
to a d.ts
for residing in the declarations
folder.
It's totally up to folks to manage that file a different way of course! Just remember to update package.json#exports
for when you change the location / file type.
that the rollup script brings this warning Generated an empty chunk.
this is because it's usually a types only file, with no runtime code.
While addon converting to a V2 and adding glint i have seen, that the rollup script brings this warning
Generated an empty chunk
.I have looked in other addons which are already converted and i have seen that some other addons has also this behavior.
For example
ember-file-upload
(https://github.com/adopted-ember-addons/ember-file-upload/issues/1067): https://github.com/adopted-ember-addons/ember-file-upload/actions/runs/7606502732/job/20712414961#step:4:40Also in ember
ember-truth-helpers
we have the same (https://github.com/jmurphyau/ember-truth-helpers/pull/203):In
ember-page-title
this line is not present, so also the empty file is not present on npm.. https://github.com/ember-cli/ember-page-title/blob/master/addon/rollup.config.mjs#L19-L24This is cause by following line which is still present in the addon blueprint: https://github.com/embroider-build/addon-blueprint/blob/b1168b4616adf748bd713c5af39e104325982e9b/files/__addonLocation__/rollup.config.mjs#L23
At the end we are shipping a empty
template-registry.js
tonpm
(https://www.npmjs.com/package/ember-file-upload?activeTab=code)Is there any reason why
template-registry.js
was added inpublicEntrypoints
? Can we safely remove?