@chialab/esbuild-plugin-emit
Advanced tools
Comparing version 0.11.2 to 0.11.4
@@ -6,2 +6,7 @@ import path from 'path'; | ||
/** | ||
* The namespace for emitted files. | ||
*/ | ||
const EMIT_FILE_NS = 'emit-chunk'; | ||
/** | ||
* The filter regex for file imports. | ||
@@ -122,4 +127,10 @@ */ | ||
path: getSearchParams(args.path).path, | ||
namespace: EMIT_FILE_NS, | ||
})); | ||
build.onLoad({ filter: /./, namespace: EMIT_FILE_NS }, async (args) => ({ | ||
contents: await readFile(args.path, 'utf-8'), | ||
loader: 'file', | ||
})); | ||
build.onResolve({ filter: EMIT_CHUNK_REGEX }, (args) => ({ | ||
@@ -126,0 +137,0 @@ path: getSearchParams(args.path).path, |
{ | ||
"name": "@chialab/esbuild-plugin-emit", | ||
"type": "module", | ||
"version": "0.11.2", | ||
"version": "0.11.4", | ||
"description": "Helpers functions to emit chunks and files from a esbuild run.", | ||
@@ -37,3 +37,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "437b08e536f3db42451a67e79613232da31f2f58" | ||
"gitHead": "029f0881b8f1138d52d9ded0fb60f2d34579281f" | ||
} |
9625
197