From 921d8565ba0adb1900772920577a43186a7c51c6 Mon Sep 17 00:00:00 2001 From: James Lan Date: Sun, 8 Feb 2026 14:59:55 -0800 Subject: [PATCH] Obfuscate importing node module, to avoid esbuild complaining --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 30b2357..af67aff 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "compile": "cd out && emmake make -j4", "config": "cd out && emconfigure ../libxml2/autogen.sh --with-winpath --without-sax1 --without-modules --without-html --without-threads --without-catalog --without-debug --disable-shared --enable-static CFLAGS='-O2'", "cov": "c8 npm run unit", - "dist": "cp out/libxml2raw.* src/libxml2raw.* lib", + "dist": "cp src/libxml2raw.* lib && sed 's/import\\((\"\\(node:\\)\\{0,1\\}module\")\\)/((m)=>import(m))\\1/' out/libxml2raw.mjs > lib/libxml2raw.mjs # see issue #140", "doc": "typedoc", "docwatch": "typedoc --watch", "init": "mkdir -p out && mkdir -p lib",