Eleventy 3.0.0-alpha.2



in ,

I just updated https://kevin.gimbel.dev/ops to Eleventy 3.0.0-alpha.2

The update was rather smooth, which I expected given the small code base of my website. The diff can be seen here on GitHub: https://github.com/KevinGimbel/kevin.gimbel.dev/commit/c4bf1eba988869b54131a2cb85e031311503707e

After setting "type": "module" in my package json I went through the files one by one changing all require() calls to imports.

One thing took a bit to get working: I use the eleventy package.json to read meta data about eleventy, and apparently with imports the type must be set:

import eleventyPackage from "@11ty/eleventy/package.json" with { type: 'json' };

with { type: 'json' }; tells Node that this thing should be imported as JSON. The syntax is new to me and I’ve never seen it before so that was exciting!

The only thing that isn’t working on MacOS is the built-in. There’s already a GitHub issue about it https://github.com/11ty/eleventy/issues/3128 – everything else seems to work fine.

Additional Links


Leave a Reply