eleventy-upgrade-help v3.0? #3196
-
I can't wait until Eleventy 3.0 is ready and stable to upgrade my 2.0 version. I want to use ES Modules Dynamic Import in my project. For example, in .eleventy.js
Is that so? And what about Which modules should become Will there be a plugin to help with the upgrade, like eleventy-upgrade-help v3.0? Will WebC become a core template language in Eleventy 3.0? If so, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Migrating to ESM can be a bit daunting at first but, when you get going, it should be quite straightforward. I converted my (fairly simple) website in less than an hour. Creating a new branch for the conversion made me fell a lot ore at ease with the process ;o) Example for a plugin This: Beyond the config, I mainly had to convert filters, shortcodes and global and directory data files to ESM syntax. What helped me most was to look at other ESM conversions and find out what was changed in various files
If you go step by step you should be fine. Good luck ! |
Beta Was this translation helpful? Give feedback.
Migrating to ESM can be a bit daunting at first but, when you get going, it should be quite straightforward. I converted my (fairly simple) website in less than an hour. Creating a new branch for the conversion made me fell a lot ore at ease with the process ;o)
I started with adding
type="module"
to my package.json and them moved toeleventy.config.js
Example for a plugin
This:
const { EleventyRenderPlugin } = require("@11ty/eleventy");
Should become
import { EleventyRenderPlugin } from "@11ty/eleventy";
Beyond the config, I mainly had to convert filters, shortcodes and global and directory data files to ESM syntax.
What helped me most was to look at other ESM conversions and find out wh…