From c9e86b3f6fca18ed1d192055b483ed978190395f Mon Sep 17 00:00:00 2001 From: Treecat Date: Fri, 3 Mar 2023 16:36:51 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-14512=20refact:=20=E4=BD=BF=E7=94=A8=20b?= =?UTF-8?q?abel=20=E6=89=93=E5=8C=85=E5=87=BA=20ESM=20=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 18f8b60a4..3c642bb2b 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,13 @@ "version": "2.0.20230208163847", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", + "module": "dist/esm/index.js", "types": "dist/lib/index.d.ts", "bin": { "fui-cli": "./bin/cli/cli.js" }, "devDependencies": { + "@babel/cli": "^7.21.0", "@babel/core": "^7.17.4", "@fui/babel-preset-fineui": "^3.0.0", "@fui/eslint-plugin": "^1.0.19", @@ -21,6 +23,7 @@ "@typescript-eslint/parser": "2.33.0", "autoprefixer": "9.6.1", "babel-loader": "8.0.6", + "babel-plugin-module-resolver": "^5.0.0", "chai": "4.2.0", "concat": "1.0.3", "core-js": "3.3.2", @@ -66,10 +69,12 @@ "webpack:prod": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack -p --progress --config=webpack/webpack.prod.js --mode production && npm run biCss && npm run jsyCss", "webpack:css": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack -p --progress --config=webpack/webpack.css.js --mode production", "start": "node server.js", - "build": "npm run webpack:prod && tsc", + "build": "npm run esm && npm run webpack:prod && tsc", "postbuild": "node ./lib/postbuild/postbuild.js", "test": "karma start", "dev": "npm run webpack:dev", + "esm": "babel src -d dist\\esm --config-file .\\es6.babel.js", + "esm:dev": "babel src -d dist\\esm --config-file .\\es6.babel.js -w", "prepublishToPrivate": "npm run build && node ./lib/prepublish/prepublish.js", "publishToPrivate": "npm publish", "postpublishToPrivate": " node ./lib/postpublish/postpublish.js", @@ -91,6 +96,7 @@ "author": "fanruan", "license": "MIT", "dependencies": { + "@popperjs/core": "2.11.6", "@types/yargs": "17.0.13", "jquery": "3.6.3", "yargs": "17.6.2"