diff --git a/utils/rollup-build-target.mjs b/utils/rollup-build-target.mjs index 214663f6580..5be9f02d1f4 100644 --- a/utils/rollup-build-target.mjs +++ b/utils/rollup-build-target.mjs @@ -210,6 +210,7 @@ function buildTarget({ moduleFormat, buildType, bundleState, input = 'src/index. swcPlugin({ swc: swcOptions(isDebug, isUMD, isMin) }) ], output: { + banner: isUMD ? getBanner(BANNER[buildType]) : undefined, plugins: getOutPlugins(), file: `${dir}/${OUT_PREFIX[buildType]}${isUMD ? '.js' : '.mjs'}` }, diff --git a/utils/rollup-swc-options.mjs b/utils/rollup-swc-options.mjs index c3551ce0dfe..0a2d366beb7 100644 --- a/utils/rollup-swc-options.mjs +++ b/utils/rollup-swc-options.mjs @@ -16,7 +16,7 @@ function swcOptions(isDebug, isUMD, minify) { target: isUMD ? 'es5' : 'es2022', minify: { format: { - comments: !isDebug || minify ? false : 'all' + comments: !isDebug || minify ? 'some' : 'all' }, mangle: minify, compress: (!isDebug && minify) ? {