Wrote a little blog post on using @eleven_ty and @vite_js together. Two great tastes that taste great together! There are certainly improvements that can be made, but found this worked really well, and quickly!

snugug.com/musings/eleventy-plus-vite

  • 4
  • 46
  1. @eleven_ty @vite_js So I spent the weekend and wrote a little thing to solve the rough edges between Vite and Eleventy. Introducing Vite Plugin Eleventy

    npmjs.com/package/vite-plugin-eleventy

    It’s super alpha software, so read all the caveats in the README before using, but for my testing setup, it works great

    • 3
    • 22
    1. @eleven_ty @vite_js I’ve been playing around with this some more, have a couple of updates pushed for it, and have two small projects running on it. So far, it feels really good. I think the key to this setup is not overloading 11ty w/transforms or other code that greatly increases build speed.

      • 0
      • 0
      1. @eleven_ty @vite_js Instead, rely on Vite to do some of that; for instance, I’m moving my image transforms from 11ty to a Vite plugin; same with my HTML minification

        • 0
        • 0
  2. The two ways I think it could be cleaner are I guess @vite_js feature requests: support for mounts like Snowpack and if Vite supported multi-page entries out-of-the-box for build like it does for dev.

    • 0
    • 1