-
-
Notifications
You must be signed in to change notification settings - Fork 555
Closed
Labels
enhancementfavoriteVanity label! We like this enhancement request a lot.Vanity label! We like this enhancement request a lot.
Milestone
Description
Extension to the configuration API that would allow developers to add their own code to handle a new file extension template type.
Some fake code to get the discussion started:
const Vue = require("vue");
const renderer = require("vue-server-renderer").createRenderer();
eleventyConfig.addExtension("vue", function(path, fileContents) {
return function(data) {
var app = new Vue({
template: fileContents,
data: function() {
return { data };
}
});
return renderer.renderToString(app);
};
});
Will process all *.vue
files in the --input
directory and write the files to --output
.
Needs to:
- Return a repeatable compiled template function (accepts
data
object)
zachleat, matuzo, jabranr, medfreeman, jevets and 272 morexplosionmind
Metadata
Metadata
Assignees
Labels
enhancementfavoriteVanity label! We like this enhancement request a lot.Vanity label! We like this enhancement request a lot.