esbuild-compress-plugin: fix a shadow

`path` is the `node:path` module, so avoid shadowing it with a local.
This commit is contained in:
Allison Karlitskaya 2026-11-02 15:53:10 +01:00
parent 19402ce11f
commit 313b77cef4

View file

@ -35,9 +35,9 @@ export const cockpitCompressPlugin = ({ subdir = '', exclude = null } = {}) => (
setup(build) {
build.onEnd(async () => {
const gzipPromises = [];
const path = "./dist/" + subdir;
const outpath = "./dist/" + subdir;
for await (const dirent of getAllFiles(path)) {
for await (const dirent of getAllFiles(outpath)) {
if (exclude && exclude.test(dirent))
continue;
if (dirent.endsWith('.js') || dirent.endsWith('.css')) {