Releases: BjornTheProgrammer/bun-plugin-html
Releases · BjornTheProgrammer/bun-plugin-html
v2.0.0
v1.3.4
Added Error to response object from Bun.build to let user know that bun-plugin-html is currently unable to fix the response object, and that this doesn't mean that the code isn't compiled properly.
{
outputs: [],
success: false,
logs: [
error: bun-plugin-html does not support output information at this time.
at /Users/bjorn/Desktop/bun-plugin-html/test/starting/index.html:1:0
],
}
v1.3.3
What Changed
Fixed common path resolve not using entry point file.
v1.3.2
What Changed
Fixed bug where inlined js closing script tag in a string would break html.
index.html
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello World!</title>
</head>
<body>
<script src="./main.tsx"></script>
</body>
main.ts
console.log("</script>")
build.ts
await Bun.build({
entrypoints: ['./index.html'],
outdir: generationDirectory,
plugins: [html({ inline: true })],
})
Output
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello World!</title>
</head>
<body>
<script>
console.log("\x3C/script>")
</script>
</body>
v1.3.1
What Changed
Fixed bug, in which if a single path was provided, it would say the root dir was that path.
v1.3.0
What's Changed
Filtering out certain extensions from being processed by this extension is now an option.
await Bun.build({
entrypoints: ['./test/starting/index.html'],
outdir: generationDirectory,
plugins: [html({filter: ['.css', '.ico', '.tsx']})],
})
Adding other Bun plugins is now an option
await Bun.build({
entrypoints: ['./test/starting/index.html'],
outdir: generationDirectory,
plugins: [html({
plugin: dts()
})],
})
Any file that is referenced in the HTML automatically gets put into the build file.
v1.2.0
What's Changed
Inlining
Inline is now an option in the plugin
type BunPluginHTMLOptions = {
inline: boolean | {
css?: boolean;
js?: boolean;
};
};
v1.1.0
What's changed
- Added minification support
v1.0.0
What's Changed?
Everything, this is a brand new plugin!
- Able to add HTML files as entrypoints
- Scripts are automatically compiled to js and moved to outdir
- Link hrefs are also transported automatically to the outdir