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

Empty chunks generated by Rollup for assets in Vite’s public folder #14

Closed
matthiasott opened this issue Jul 18, 2022 · 2 comments
Closed

Comments

@matthiasott
Copy link

Removing lines 50 and 54 in EleventyVite.js (in 6bae645) leads to Rollup generating empty JS files again (also see #3) when files like feeds.xml, robots.txt, or sitemap.xml are processed by Eleventy and placed in the Vite public folder in the temp directory, e.g. .11ty-vite/public/.

Generated an empty chunk: "build"
Generated an empty chunk: "feed"
Generated an empty chunk: "robots"
Generated an empty chunk: "sitemap"

image

Normally, those files should be ignored by Vite because they're in the public folder, yet they are explicitly being added to viteOptions.build.rollupOptions.input with all other items of the results array on eleventy.after. Adding the items of the results array to rollupOptions.input is needed so that all HTML files are added as entry points. So re-adding the filter() makes the most sense IMO.

Could create a PR for this – just LMK @zachleat! 🤗

@matthiasott matthiasott changed the title Empty chunks generated by Rollup for assets in Vite’s publicfolder Empty chunks generated by Rollup for assets in Vite’s public folder Jul 18, 2022
@KiwiKilian
Copy link
Contributor

I think this was fixed via 7cd0709? Could be closed.

@zachleat zachleat added this to the Eleventy Vite Plugin v2.0.0 milestone Jan 27, 2023
@zachleat
Copy link
Member

Yes, thank you @KiwiKilian. This shipped with 2.0.0-canary.2 (stable version shipping today!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants