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

Updated instructions to add svg library for Eleventy 3.0 do not work with webc #27

Open
urob opened this issue Jun 10, 2024 · 0 comments

Comments

@urob
Copy link

urob commented Jun 10, 2024

I am trying to adapt the example in the readme (9ef561b) on how to add an svg library under Eleventy 3.0 using WebC. But I keep getting an error Invalid bundle type: svg.

Are there any updated instructions or an example how to do this using WebC with Eleventy 3.0? (I have seen #12 but this seems to be outdated).


This is the configuration I am trying:

eleventy.config.js:

export default async function (config) {
   config.addBundle('svg')
}

base.webc:

<svg width="0" height="0" aria-hidden="true" style="position: absolute;">
  <defs webc:keep @raw="getBundle('svg')"></defs>
</svg>

This throws an error: Invalid bundle type: svg


Installed versions and subdependencies:

  • eleventy: 3.0.0-alpha.10
    • eleventy-plugin-bundle: 2.0.2
  • eleventy-plugin-webc: 0.11.2
    • eleventy-plugin-bundle: 1.0.5
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

1 participant