From 4713add7ee2ff6eb928b905cca53c73c53c39013 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Wed, 30 Jul 2025 20:15:58 +0700 Subject: [PATCH] feat(scripts/build): change bundler options --- scripts/build.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/build.ts b/scripts/build.ts index f8ada04..4641e7b 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -39,8 +39,21 @@ export default async function build(dev = Dev, log = true) { const bundle = await rolldown({ input: 'src/index.ts', platform: 'neutral', - experimental: { - strictExecutionOrder: true, + optimization: { + inlineConst: true, + // @ts-expect-error: Option not documented, but added in 1.0.0-beta.30 + pifeForModuleWrappers: true, + }, + preserveEntrySignatures: false, + transform: { + assumptions: { + pureGetters: true, + setPublicClassFields: true, + noDocumentAll: true, + // TODO: "Not implemented" + // objectRestNoSymbols: true, + // ignoreFunctionLength: true, + }, }, resolve: { tsconfigFilename: 'tsconfig.json', @@ -147,7 +160,10 @@ export default async function build(dev = Dev, log = true) { compress: false, mangle: true, }, + exports: 'none', + esModule: false, minifyInternalExports: true, + hoistTransitiveImports: false, file: 'dist/revenge.js', format: 'iife', })