From 61758a2e202a4eed0dd02e8a486e7cf9de69f309 Mon Sep 17 00:00:00 2001 From: Cris Stringfellow <22254235+crislin2046@users.noreply.github.com> Date: Thu, 1 Aug 2024 13:46:03 +0800 Subject: [PATCH] Correct public build for global --- scripts/build_only.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build_only.sh b/scripts/build_only.sh index 1532a6b..3909070 100755 --- a/scripts/build_only.sh +++ b/scripts/build_only.sh @@ -18,6 +18,7 @@ else ./node_modules/.bin/esbuild src/app.js --bundle --outfile=build/esm/downloadnet.mjs --format=esm --platform=node --minify --analyze ./node_modules/.bin/esbuild src/app.js --bundle --outfile=build/cjs/out.cjs --platform=node --minify --analyze fi +cp -r public build/ echo "const bigR = require('module').createRequire(__dirname); require = bigR; process.traceProcessWarnings = true; " > build/cjs/dn.cjs # polyfill for process.disableWarning idea as node arg --disableWarning=ExperimentalWarning is likely not accessible in this setup #echo "const __orig_emit = process.emit; process.emit = (event, error) => event === 'warning' && error.name === 'ExperimentalWarning' ? false : originalEmit.call(process, event, error);" >> build/cjs/dn.cjs