New in Eleventy Bundle v3.0.4: a new option to populate per-route bundles with content right out of your HTML.

github.com/11ty/elevent...

Here’s an example that puts all `<style>` element content into a `css` bundle:

// Per-page bundles, see https://github.com/11ty/eleventy-plugin-bundle eleventyConfig.addBundle("css", { // Add all style> content to css bundle (use style eleventy:ignore> to opt-out) // Supported selectors: https://www.npmjs.com/package/posthtml-match-helper bundleHtmlContentFromSelector: "style", });