@chialab/esbuild-plugin-html
Advanced tools
Comparing version 0.4.3 to 0.4.5
@@ -17,3 +17,3 @@ import path from 'path'; | ||
* @property {Partial<import('esbuild').BuildOptions>} options The file name of the referenced file. | ||
* @property {(filePath: string) => Promise<void>|void} finisher A callback function to invoke when output file has been generated. | ||
* @property {(filePath: string, outputFiles: string[]) => Promise<void>|void} finisher A callback function to invoke when output file has been generated. | ||
*/ | ||
@@ -56,2 +56,3 @@ | ||
metafile: true, | ||
external: [], | ||
...entrypoint.options, | ||
@@ -65,3 +66,4 @@ }; | ||
let outputs = Object.keys(result.metafile.outputs); | ||
await entrypoint.finisher(outputs[0]); | ||
let outputFile = outputs[0].endsWith('.map') ? outputs[1] : outputs[0]; | ||
await entrypoint.finisher(outputFile, outputs); | ||
@@ -68,0 +70,0 @@ if (entrypoint.loader === 'file') { |
{ | ||
"name": "@chialab/esbuild-plugin-html", | ||
"type": "module", | ||
"version": "0.4.3", | ||
"version": "0.4.5", | ||
"description": "A HTML loader plugin for esbuild.", | ||
@@ -34,3 +34,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "80f07dd34ffe55135ba8f1649a54669ce37dcf2a" | ||
"gitHead": "071fac5bd3f272ada30e29e06074fbb2688532d6" | ||
} |
@@ -5,3 +5,3 @@ /** | ||
* @property {Partial<import('esbuild').BuildOptions>} options The file name of the referenced file. | ||
* @property {(filePath: string) => Promise<void>|void} finisher A callback function to invoke when output file has been generated. | ||
* @property {(filePath: string, outputFiles: string[]) => Promise<void>|void} finisher A callback function to invoke when output file has been generated. | ||
*/ | ||
@@ -26,4 +26,4 @@ /** | ||
*/ | ||
finisher: (filePath: string) => Promise<void> | void; | ||
finisher: (filePath: string, outputFiles: string[]) => Promise<void> | void; | ||
}; | ||
import esbuildModule from "esbuild"; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37277
754