You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

html-inline-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-inline-webpack-plugin - npm Package Compare versions

Comparing version

to
1.0.0-beta5

16

dist/modules/head_injector.js

@@ -43,9 +43,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

}
performAsset(compilation) {
fs_1.default.readFile(this.path, (err, data) => {
if (err) {
throw new Error(`Exception while reading the file of a given favicon path: ${err.message}`);
}
compilation.emitAsset(this.assetName, new webpack_1.sources.RawSource(data));
});
async performAsset(compilation) {
try {
const buffer = fs_1.default.readFileSync(this.path);
const source = buffer.toString();
compilation.emitAsset(this.assetName, new webpack_1.sources.RawSource(source));
}
catch (err) {
throw new Error(`Exception while reading the file of a given favicon path: ${err.message}`);
}
}

@@ -52,0 +54,0 @@ }

@@ -17,3 +17,3 @@ import { HTMLElement } from "node-html-parser";

perform(compilation: Compilation, parent: HTMLElement): void;
performAsset(compilation: Compilation): void;
performAsset(compilation: Compilation): Promise<void>;
}
{
"name": "html-inline-webpack-plugin",
"description": "This webpack plugin package is bundling related HTML files by injecting inline tags.",
"version": "1.0.0-beta4",
"version": "1.0.0-beta5",
"main": "./dist/index.js",

@@ -6,0 +6,0 @@ "types": "./dist/types/index.d.ts",

@@ -8,3 +8,3 @@ <div align="center">

<th>Version</th>
<th>v1.0.0-beta4</th>
<th>v1.0.0-beta5</th>
</tr>

@@ -11,0 +11,0 @@ </tbody>

@@ -32,11 +32,11 @@ import { HTMLElement } from "node-html-parser";

performAsset(compilation: Compilation) {
fs.readFile(this.path, (err, data) => {
if (err) {
throw new Error(`Exception while reading the file of a given favicon path: ${err.message}`);
}
compilation.emitAsset(this.assetName, new sources.RawSource(data));
});
async performAsset(compilation: Compilation) {
try {
const buffer = fs.readFileSync(this.path);
const source = buffer.toString();
compilation.emitAsset(this.assetName, new sources.RawSource(source));
} catch (err) {
throw new Error(`Exception while reading the file of a given favicon path: ${(err as Error).message}`);
}
}
}
SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.