diff --git a/.fatherrc.js b/.fatherrc.js index 6dbfcd5..daa7219 100644 --- a/.fatherrc.js +++ b/.fatherrc.js @@ -1,6 +1,7 @@ export default { - target: 'node', - cjs: { type: "babel", lazy: true }, + target: 'browser', + cjs: { type: "rollup", lazy: false }, + esm: { type: "rollup" }, disableTypeCheck: false, pkgs: ['core', 'react'], }; diff --git a/packages/core/package.json b/packages/core/package.json index e747cd9..9530bcc 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,10 +1,11 @@ { "name": "@fortune-sheet/core", "version": "0.1.0", - "main": "lib/index.js", - "typings": "lib/index.d.ts", + "main": "dist/index.js", + "module": "dist/index.esm.js", + "typings": "dist/index.d.ts", "files": [ - "lib" + "dist" ], "repository": "https://github.com/ruilisi/fortune-sheet", "license": "MIT", diff --git a/packages/react/.fatherrc.js b/packages/react/.fatherrc.js index 8a80b50..623f9ac 100644 --- a/packages/react/.fatherrc.js +++ b/packages/react/.fatherrc.js @@ -1,7 +1,8 @@ export default { - target: 'browser', - cjs: { type: 'rollup', lazy: false }, - esm: { type: 'rollup' }, + target: "browser", + cjs: { type: "rollup", lazy: false }, + esm: { type: "rollup" }, + umd: { globals: { Workbook: "Workbook" }, minFile: true }, extractCSS: true, disableTypeCheck: false, };