0.0.4 • Published 8 months ago

esbuild-plugin-template v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

esbuild-plugin-template

Emit templated files at the end of an Esbuild run.

Usage

import htmlPlugin from 'esbuild-plugin-template'

plugins: [
    htmlPlugin([{ filename, templateStringOrFn }])
]

If templateStringOrFn is a function it is passed esbuildResult, esbuildInitialOptions and must return a string.

If templateStringOrFn is a string <--js--> and <--css--> are replaced with all emitted js and css files.

If templateStringOrFn is undefefined it is set to a default string for HTML that templates JS and CSS.

If no arguments are passed, a default of [{ filename = 'index.html' }] is used.

0.0.4

8 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago