build(package): 重构项目并添加 Rollup 构建配置

- 修改 package.json 中的 exports 字段,支持 CommonJS 和 ES 模块
- 添加 build 脚本,使用 Rollup 进行构建
- 新增 devDependencies,包含 Babel 和 Rollup 相关插件
This commit is contained in:
2025-02-21 12:59:37 +08:00
parent 22d3931665
commit 6421bcbbf0
7 changed files with 3006 additions and 5 deletions

9
babel.config.json Normal file
View File

@@ -0,0 +1,9 @@
{
"presets": [
["@babel/preset-env", {
"targets": {
"node": "current"
}
}]
]
}