Skip to content
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

template-registry warning Generated an empty chunk while rollup #1067

Closed
mkszepp opened this issue Feb 3, 2024 · 2 comments · Fixed by #1068
Closed

template-registry warning Generated an empty chunk while rollup #1067

mkszepp opened this issue Feb 3, 2024 · 2 comments · Fixed by #1068
Labels

Comments

@mkszepp
Copy link
Contributor

mkszepp commented Feb 3, 2024

I have seen that there will exported template-registry as empty file:

grafik

Last test run:
https://github.com/adopted-ember-addons/ember-file-upload/actions/runs/7606502732/job/20712414961#step:4:40

Edit: found this issue on addon blueprint embroider-build/addon-blueprint#195 (comment)

Edit 2: While working on a other addon i have found out, that line is not necessary and generates the empty file. we can remove it:
https://github.com/adopted-ember-addons/ember-file-upload/blob/master/ember-file-upload/rollup.config.mjs#L27

@gilest
Copy link
Collaborator

gilest commented Feb 6, 2024

Ah nice find. I think you're right.

I was under the impression that only publicEntrypoints entries could be imported by a consuming app. But it doesn't seem to affect the build output except for removing that empty file.

This isn't actually covered by the test suite though – since the template registry is only used by Glint's "loose mode" and the test-app is now in "strict mode". I don't really want to add a whole test app just to cover that 🤔

Do you have an Ember app running Glint in "loose" mode that you can test this with?

Would prefer we check it now than find out through a bug report 😅

@mkszepp
Copy link
Contributor Author

mkszepp commented Feb 6, 2024

Unfortunately I don't have an app that has loose mode active... i have discoverd this only while other addon migration.
In ember-page-title they do not export it in publicEntrypoint (the file is only present in declaration folder)...

I have seen that the addon-blueprint brings this line... so maybe this is a bug from blueprint.. i have for now created a issue in addon-blueprint (embroider-build/addon-blueprint#252)... maybe we wait for feedback and than we go on

@gilest gilest added bug internal and removed bug labels Feb 8, 2024
gilest pushed a commit that referenced this issue Feb 8, 2024
fix #1067

This is fixing a warning while rollup

../ember-file-upload prepare: [js] (!) Generated an empty chunk
../ember-file-upload prepare: [js] "template-registry"
gvdp pushed a commit to Bagaar/ember-file-upload that referenced this issue May 24, 2024
…pted-ember-addons#1068)

fix adopted-ember-addons#1067

This is fixing a warning while rollup

../ember-file-upload prepare: [js] (!) Generated an empty chunk
../ember-file-upload prepare: [js] "template-registry"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants