@marko/compiler
v5.42.12
Published
Marko template to JS compiler.
Readme
@marko/compiler
Compiles Marko templates into JavaScript modules.
The bundler integrations call the compiler for every template, so applications rarely use it directly. It is the API for building a bundler integration, a test transform, or other tooling around Marko templates.
npm install @marko/compilerimport * as compiler from "@marko/compiler";
const { code, map } = await compiler.compileFile("./src/card.marko", {
output: "dom",
sourceMaps: true,
});See the Compiler API reference for the compile functions, their options and the compile result.
