@11ty/eleventy-plugin-webc 0.11.1-alpha.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
const path = require("path");
|
|
2
2
|
const debug = require("debug")("Eleventy:WebC");
|
|
3
3
|
|
|
4
|
-
const { EleventyRenderPlugin } = require("@11ty/eleventy");
|
|
5
|
-
const CompileString = EleventyRenderPlugin.String;
|
|
6
|
-
|
|
7
4
|
function relativePath(inputPath, newGlob) {
|
|
8
5
|
// project root
|
|
9
6
|
if(newGlob.startsWith("~/")) {
|
|
@@ -117,6 +114,9 @@ module.exports = function(eleventyConfig, options = {}) {
|
|
|
117
114
|
page.setTransform("11ty", async function(content) {
|
|
118
115
|
let syntax = this["11ty:type"];
|
|
119
116
|
if(syntax) {
|
|
117
|
+
const { EleventyRenderPlugin } = await import("@11ty/eleventy");
|
|
118
|
+
const CompileString = EleventyRenderPlugin.String;
|
|
119
|
+
|
|
120
120
|
let fn = await CompileString(content, syntax, {
|
|
121
121
|
templateConfig
|
|
122
122
|
});
|