Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-html-plugin

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-html-plugin - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

14

lib/index.js

@@ -1,2 +0,1 @@

import { minify } from 'html-minifier';
import { writeFile } from 'node:fs/promises';

@@ -25,14 +24,3 @@ import { dirname, join, relative } from 'node:path';

].join(`\n`);
await writeFile(join(outdir, outfile), minify(html, {
caseSensitive: true,
collapseWhitespace: true,
conservativeCollapse: true,
decodeEntities: true,
keepClosingSlash: true,
minifyCSS: options.minify,
minifyJS: options.minify,
removeComments: options.minify,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
}), { encoding: `utf-8` });
await writeFile(join(outdir, outfile), html, { encoding: `utf-8` });
});

@@ -39,0 +27,0 @@ },

26

package.json
{
"name": "esbuild-html-plugin",
"version": "1.0.1",
"version": "1.1.0",
"description": "An esbuild plugin that generates an HTML file.",

@@ -12,4 +12,5 @@ "repository": {

"type": "module",
"exports": "./lib/index.js",
"types": "./lib/index.d.ts",
"exports": {
".": "./lib/index.js"
},
"files": [

@@ -27,18 +28,9 @@ "lib"

},
"dependencies": {
"html-minifier": "^4.0.0"
},
"devDependencies": {
"@types/html-minifier": "^4.0.5",
"@types/node": "^20.9.0",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"esbuild": "^0.19.5",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-markdown": "^3.0.1",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
"@types/node": "^20.12.12",
"onecfg-lib-eslint": "^1.1.0",
"esbuild": "^0.21.2",
"prettier": "^3.2.5",
"typescript": "^5.4.5"
}
}

@@ -6,4 +6,3 @@ # esbuild-html-plugin

This esbuild plugin allows the creation of an HTML file featuring output URLs of bundled assets,
while supporting customization of head and body elements. The esbuild's `minify` option handles
minification.
while supporting customization of head and body elements.

@@ -24,3 +23,2 @@ ## Installation

bundle: true,
minify: true,
outdir: `dist`,

@@ -27,0 +25,0 @@ publicPath: `/static`,

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc