Replies: 3 comments 4 replies
-
I tried to move all code like But it looks like the bundles are now empty, |
Beta Was this translation helpful? Give feedback.
-
I don't have a direct answer for you, but you may have more luck asking on the 11ty Discord Server. There are few folks over there that have experince with custom langages and the bundle plugin. |
Beta Was this translation helpful? Give feedback.
-
I've open a dedicated issue for the multiple bundlings in the plugin repo: 11ty/eleventy-plugin-bundle#36 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is quite complex to explain.
I use Custom template formats to deal with CSS and JavaScript compilation with Sass and esbuild: https://github.com/nhoizey/eleventy-plugin-pack11ty/blob/main/_11ty/assets.js
I also use the Bundle plugin to manage multiple CSS and JavaScript bundles.
For example, I include JS content in the
<head>
of each page with this include: https://github.com/nhoizey/pack11ty/blob/main/src/_includes/js.njkThis include both:
{% renderFile … %}
, which calls the compilation of the corresponding custom format.It means that if I have 100 pages with this include, each JavaScript file will be compiled 100 times, while it's the very same. 😱
Is there a way to compile the custom format files only once each, but include them with the Bundle plugin many times?
I'm lost here… it looks like I've misused all this for years now…
Beta Was this translation helpful? Give feedback.
All reactions