Closed ghost closed 10 months ago
If anyone is using this plugin with the alpha builds of Eleventy 3.0, this patch will work as a temporary fix until the plugin is updated properly:
diff --git a/node_modules/@11ty/eleventy-plugin-webc/src/eleventyWebcTemplate.js b/node_modules/@11ty/eleventy-plugin-webc/src/eleventyWebcTemplate.js index 3aeb86e..41a2c5a 100644 --- a/node_modules/@11ty/eleventy-plugin-webc/src/eleventyWebcTemplate.js +++ b/node_modules/@11ty/eleventy-plugin-webc/src/eleventyWebcTemplate.js @@ -1,8 +1,11 @@ const path = require("path"); const debug = require("debug")("Eleventy:WebC"); -const { EleventyRenderPlugin } = require("@11ty/eleventy"); -const CompileString = EleventyRenderPlugin.String; +let CompileString; +(async () => { + const { EleventyRenderPlugin } = await import("@11ty/eleventy"); + CompileString = EleventyRenderPlugin.String; +})(); function relativePath(inputPath, newGlob) { // project root
This becomes irrelevant with the completion of https://github.com/11ty/eleventy/issues/2840
Fix shipped with v0.11.2, thank you!
Notably, this was still required if folks are using Eleventy WebC in CJS projects in 3.0!
If anyone is using this plugin with the alpha builds of Eleventy 3.0, this patch will work as a temporary fix until the plugin is updated properly:
This becomes irrelevant with the completion of https://github.com/11ty/eleventy/issues/2840