Package Exports
- @marko/build
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@marko/build) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@marko/build
Utility to build a node server from a marko file
CLI
Installation
npm install marko-cli
Example
marko build .
marko build ./my-page.marko
Options
--output -o
: Where to write the build.
API
Installation
npm install @marko/build
Example
import build from "@marko/build";
build({
file: "./component.marko"
}).run(() => {
console.log("Build complete");
});
The object returned from the build
function is a webpack compiler instance.
Options
file
- the marko file to buildoutput
- where to write the buildserverPlugins
- additional webpack plugins to run on the server buildclientPlugins
- additional webpack plugins to run on the client buildproduction
- whether to build in production mode