From 8448e38c379bee2db71abb77fcc3db7488fc689a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=85=A8=E6=98=8C?= Date: Sun, 7 Sep 2025 14:27:48 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 + eslint.config.js | 1 + jest.config.js | 8 - package.json | 5 +- packages/builder-vite/package.json | 2 +- packages/builder-webpack/package.json | 8 +- .../plugins/common/webpackConfig/define.ts | 1 + packages/compiler/src/service/index.ts | 10 +- .../examples/webpack-main/src/pages/index.vue | 2 +- .../examples/webpack-micro/package.json | 19 - .../webpack-micro/src/pages/webpack/index.vue | 6 +- .../webpack-micro/src/pages/webpack/test.vue | 4 +- packages/utils/package.json | 2 + pnpm-lock.yaml | 814 +++--------------- pnpm-workspace.yaml | 9 +- turbo.json | 8 + 16 files changed, 155 insertions(+), 747 deletions(-) delete mode 100644 jest.config.js create mode 100644 turbo.json diff --git a/.gitignore b/.gitignore index 2fc11089..4b8182e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ .DS_Store .idea .history + .cache +.turbo + .temp .hound .fes diff --git a/eslint.config.js b/eslint.config.js index f3789d5e..4110aa19 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -6,6 +6,7 @@ export default await antfu({ indent: 4, quotes: 'single', semi: 'always', + ignores: ['*.yaml'], }, typescript: true, vue: true, diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index aae83a41..00000000 --- a/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ - -module.exports = { - testPathIgnorePatterns: [ - '/node_modules/', - 'fes-template', - 'fes-template-h5' - ] -}; diff --git a/package.json b/package.json index 1fccc333..0d908c74 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "scripts": { "bootstrap": "pnpm i", "dev": "node scripts/build.mjs --watch", - "build": "node scripts/build.mjs", + "build": "turbo run build", "release": "node scripts/release.mjs", "clean": "rm -rf ./node_modules & rm -rf packages/**/node_modules & rm -rf packages/**/.cache", "docs:dev": "vitepress dev docs", @@ -38,7 +38,8 @@ "execa": "^6.1.0", "minimist": "^1.2.6", "semver": "^7.3.6", - "tsup": "^8.5.0" + "tsup": "^8.5.0", + "turbo": "^2.5.6" }, "devDependencies": { "@antfu/eslint-config": "^5.2.2", diff --git a/packages/builder-vite/package.json b/packages/builder-vite/package.json index ded4b817..2dabd7bf 100644 --- a/packages/builder-vite/package.json +++ b/packages/builder-vite/package.json @@ -50,7 +50,7 @@ "ejs": "^3.1.6", "fast-glob": "^3.2.11", "fs-extra": "^11.3.1", - "html-minifier-terser": "^6.1.0", + "html-minifier-terser": "^7.2.0", "less": "^4.2.0", "node-html-parser": "^5.3.3", "pathe": "^0.2.0", diff --git a/packages/builder-webpack/package.json b/packages/builder-webpack/package.json index d6ec1680..c96d6d43 100644 --- a/packages/builder-webpack/package.json +++ b/packages/builder-webpack/package.json @@ -35,10 +35,10 @@ }, "dependencies": { "@babel/core": "^7.28.3", - "@babel/plugin-proposal-do-expressions": "^7.22.5", - "@babel/plugin-proposal-export-default-from": "^7.22.17", - "@babel/plugin-proposal-function-bind": "^7.22.5", - "@babel/plugin-proposal-pipeline-operator": "^7.22.15", + "@babel/plugin-proposal-do-expressions": "^7.28.3", + "@babel/plugin-proposal-export-default-from": "^7.27.1", + "@babel/plugin-proposal-function-bind": "^7.27.1", + "@babel/plugin-proposal-pipeline-operator": "^7.27.1", "@babel/plugin-transform-runtime": "^7.28.3", "@babel/preset-env": "^7.28.3", "@babel/preset-typescript": "^7.27.1", diff --git a/packages/builder-webpack/src/plugins/common/webpackConfig/define.ts b/packages/builder-webpack/src/plugins/common/webpackConfig/define.ts index e4fdc712..088115d5 100644 --- a/packages/builder-webpack/src/plugins/common/webpackConfig/define.ts +++ b/packages/builder-webpack/src/plugins/common/webpackConfig/define.ts @@ -15,6 +15,7 @@ export default function createDefineWebpackConfig({ config, publicPath, webpackC const define = stringifyObjValue({ __VUE_OPTIONS_API__: true, __VUE_PROD_DEVTOOLS__: false, + __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false, ...(config as any).define, }); diff --git a/packages/compiler/src/service/index.ts b/packages/compiler/src/service/index.ts index 8274c93d..17ec696b 100644 --- a/packages/compiler/src/service/index.ts +++ b/packages/compiler/src/service/index.ts @@ -279,7 +279,8 @@ export default class Service extends EventEmitter { this.setStage(ServiceStage.initPlugins); this._extraPlugins.push(...this.initialPlugins); while (this._extraPlugins.length) { - await this.initPlugin(this._extraPlugins.shift()!); + const plugin = this._extraPlugins.shift(); + await this.initPlugin(plugin!); } } @@ -393,13 +394,6 @@ export default class Service extends EventEmitter { ..._plugins, ); } - - // 深度优先 - const extraPlugins = lodash.clone(this._extraPlugins); - this._extraPlugins = []; - while (extraPlugins.length) { - await this.initPlugin(extraPlugins.shift()!); - } } async initPlugin(plugin: Plugin): Promise { diff --git a/packages/plugin-qiankun/examples/webpack-main/src/pages/index.vue b/packages/plugin-qiankun/examples/webpack-main/src/pages/index.vue index 64b0fd07..294dcb69 100644 --- a/packages/plugin-qiankun/examples/webpack-main/src/pages/index.vue +++ b/packages/plugin-qiankun/examples/webpack-main/src/pages/index.vue @@ -2,7 +2,7 @@
hello wrold
- + diff --git a/packages/plugin-qiankun/examples/webpack-micro/package.json b/packages/plugin-qiankun/examples/webpack-micro/package.json index ad6bb11c..5f29f79a 100644 --- a/packages/plugin-qiankun/examples/webpack-micro/package.json +++ b/packages/plugin-qiankun/examples/webpack-micro/package.json @@ -10,25 +10,6 @@ "bugs": { "url": "https://github.com/WeBankFinTech/fes.js/issues" }, - "keywords": [ - "管理端", - "fes", - "fast", - "easy", - "strong" - ], - "files": [ - ".eslintrc.js", - ".fes.js", - ".fes.prod.js", - ".gitignore", - "/config", - "/src", - "README.md", - "mock.js", - "package.json", - "tsconfig.json" - ], "scripts": { "build": "fes build", "prod": "FES_ENV=prod fes build", diff --git a/packages/plugin-qiankun/examples/webpack-micro/src/pages/webpack/index.vue b/packages/plugin-qiankun/examples/webpack-micro/src/pages/webpack/index.vue index d8924319..140c3051 100644 --- a/packages/plugin-qiankun/examples/webpack-micro/src/pages/webpack/index.vue +++ b/packages/plugin-qiankun/examples/webpack-micro/src/pages/webpack/index.vue @@ -1,15 +1,17 @@ + { "name": "index", "title": "home" } +