mirror of
https://git.ddmt.top/ddmt/ddmt-tool.git
synced 2026-03-23 05:17:06 +00:00
build(package): 重构项目并添加 Rollup 构建配置
- 修改 package.json 中的 exports 字段,支持 CommonJS 和 ES 模块 - 添加 build 脚本,使用 Rollup 进行构建 - 新增 devDependencies,包含 Babel 和 Rollup 相关插件
This commit is contained in:
19
package.json
19
package.json
@@ -6,23 +6,32 @@
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./index.js",
|
||||
"require": "./index.js"
|
||||
"require": "./dist/index.cjs",
|
||||
"import": "./dist/index.mjs"
|
||||
}
|
||||
},
|
||||
"types": "types/index.d.ts",
|
||||
"scripts": {
|
||||
"dev": "node index.js"
|
||||
"dev": "node index.js",
|
||||
"build": "rollup -c"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.ddmt.top/ddmt/ddmt-tool.git"
|
||||
},
|
||||
},
|
||||
"keywords": [
|
||||
"ddmt",
|
||||
"tool",
|
||||
"animate"
|
||||
],
|
||||
"author": "ddmt",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.26.9",
|
||||
"@babel/preset-env": "^7.26.9",
|
||||
"@rollup/plugin-babel": "^6.0.4",
|
||||
"@rollup/plugin-commonjs": "^28.0.2",
|
||||
"@rollup/plugin-node-resolve": "^16.0.0",
|
||||
"rollup": "^4.34.8"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user