This is a bundler plugin for Bundles. It uses ejs to compile Bundles input with the power of native JavaScript templating.
Node | CLI | ES Module | Browser | UMD |
---|---|---|---|---|
✓ | ✓ | x | x | x |
npm install @bundles/core @bundles/bundles-ejs -D
See configuring Bundles for how to configure Bundles and bundlers.
All options in bundler.options
are passed directly to EJS. Please note the following:
options.filename
is automatically set by the bundler.- If
options.context
is undefined, the bunder will automatically usefile.data
as the context. This allows you to usethis
in your template data. For example:<%= this.name %>
.