fix(bots/discord): deployment runtime errors due to minification

This commit is contained in:
PalmDevs
2024-07-31 01:40:30 +07:00
parent 95a122a225
commit a60c60c0f9
4 changed files with 20 additions and 2 deletions

View File

@@ -12,7 +12,11 @@ await Bun.build({
outdir: './dist/src',
target: 'bun',
external: ['./config.js'],
minify: true,
minify: {
syntax: true,
whitespace: true,
identifiers: false,
},
sourcemap: 'external',
})

BIN
bun.lockb

Binary file not shown.

View File

@@ -55,6 +55,7 @@
],
"patchedDependencies": {
"@semantic-release/npm@12.0.1": "patches/@semantic-release%2Fnpm@12.0.1.patch",
"drizzle-kit@0.22.8": "patches/drizzle-kit@0.22.8.patch"
"drizzle-kit@0.22.8": "patches/drizzle-kit@0.22.8.patch",
"decancer@3.2.3": "patches/decancer@3.2.3.patch"
}
}

View File

@@ -0,0 +1,13 @@
diff --git a/src/lib.js b/src/lib.js
index de45d7dbe82975b09eff3742d0718accae2107fc..0575daa03dfabdd5c96928458ff4270cb8f7188a 100644
--- a/src/lib.js
+++ b/src/lib.js
@@ -42,7 +42,7 @@ function isMusl() {
}
function getBinding(name) {
- const path = join(__dirname, '..', `decancer.${name}.node`)
+ const path = join(import.meta.dir, '..', `decancer.${name}.node`)
return require(existsSync(path) ? path : `@vierofernando/decancer-${name}`)
}