Skip to content

Releases: BjornTheProgrammer/bun-plugin-html

v2.0.0

12 Feb 19:51
Compare
Choose a tag to compare

What's Changed

  • Expose options for clean-css and html-minifier-terser by @casselc in #9
  • Changed name of filter option to excludeExtensions.

New Contributors

Full Changelog: v1.3.4...v2.0.0

v1.3.4

03 Jan 01:01
Compare
Choose a tag to compare

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

26 Nov 20:50
Compare
Choose a tag to compare

What Changed

Fixed common path resolve not using entry point file.

v1.3.2

25 Nov 06:40
Compare
Choose a tag to compare

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

24 Nov 22:54
Compare
Choose a tag to compare

What Changed

Fixed bug, in which if a single path was provided, it would say the root dir was that path.

v1.3.0

24 Nov 22:07
Compare
Choose a tag to compare

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

19 Sep 21:40
Compare
Choose a tag to compare

What's Changed

Inlining

Inline is now an option in the plugin

type BunPluginHTMLOptions = {
  inline: boolean | {
    css?: boolean;
    js?: boolean;
  };
};

v1.1.0

19 Sep 17:33
f4e7860
Compare
Choose a tag to compare

What's changed

  • Added minification support

v1.0.0

18 Sep 15:10
Compare
Choose a tag to compare

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