更新库rollup配置

This commit is contained in:
YHH
2025-08-11 10:25:28 +08:00
parent 6a49f6a534
commit 7daf352a25
11 changed files with 291 additions and 82 deletions

View File

@@ -76,6 +76,31 @@ module.exports = [
moduleSideEffects: false
}
},
// UMD构建 - 用于CDN和浏览器直接使用
{
input: 'bin/index.js',
output: {
file: 'dist/index.umd.js',
format: 'umd',
name: 'ECS',
banner,
sourcemap: true,
exports: 'named'
},
plugins: [
...commonPlugins,
terser({
format: {
comments: /^!/
}
})
],
external: [],
treeshake: {
moduleSideEffects: false
}
},
// 类型定义构建
{