From 2f7ade24c45da4247e7cc863ecc18e03931fa91e Mon Sep 17 00:00:00 2001 From: h_mo <596417202@qq.com> Date: Mon, 2 Sep 2024 23:47:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?chore(deps):=20=E6=9B=B4=E6=96=B0=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index d50c0a1..1f40f25 100644 --- a/package.json +++ b/package.json @@ -43,8 +43,8 @@ "version:major": "commit-and-tag-version --release-as major" }, "dependencies": { - "@alova/adapter-uniapp": "^2.0.4", - "@alova/mock": "^2.0.4", + "@alova/adapter-uniapp": "^2.0.5", + "@alova/mock": "^2.0.5", "@dcloudio/uni-app": "3.0.0-alpha-4020620240822002", "@dcloudio/uni-app-plus": "3.0.0-alpha-4020620240822002", "@dcloudio/uni-components": "3.0.0-alpha-4020620240822002", @@ -59,46 +59,46 @@ "@dcloudio/uni-mp-weixin": "3.0.0-alpha-4020620240822002", "@dcloudio/uni-quickapp-webview": "3.0.0-alpha-4020620240822002", "@multiavatar/multiavatar": "^1.0.7", - "alova": "^3.0.11", + "alova": "^3.0.14", "crypto-js": "^4.2.0", "lodash-es": "^4.17.21", "pinia": "^2.2.2", "vue": "^3.4.38" }, "devDependencies": { - "@antfu/eslint-config": "^2.27.1", + "@antfu/eslint-config": "^2.27.3", "@dcloudio/types": "^3.4.12", "@dcloudio/uni-automator": "3.0.0-alpha-4020620240822002", "@dcloudio/uni-cli-shared": "3.0.0-alpha-4020620240822002", "@dcloudio/uni-stacktracey": "3.0.0-alpha-4020620240822002", "@dcloudio/vite-plugin-uni": "3.0.0-alpha-4020620240822002", "@egoist/tailwindcss-icons": "^1.8.1", - "@iconify/json": "^2.2.239", + "@iconify/json": "^2.2.243", "@types/crypto-js": "^4.2.2", "@types/lodash-es": "^4.17.12", - "@types/node": "^20.16.1", - "@vitejs/plugin-vue": "^5.1.2", + "@types/node": "^20.16.3", + "@vitejs/plugin-vue": "^5.1.3", "@vue/runtime-core": "^3.4.38", "autoprefixer": "^10.4.20", - "commit-and-tag-version": "^12.4.1", - "eslint": "^9.9.0", + "commit-and-tag-version": "^12.4.2", + "eslint": "^9.9.1", "eslint-plugin-format": "^0.1.2", "globals": "^15.9.0", - "lint-staged": "^15.2.9", + "lint-staged": "^15.2.10", "picocolors": "^1.0.1", - "postcss": "^8.4.41", + "postcss": "^8.4.44", "rollup-plugin-visualizer": "^5.12.0", "sass": "^1.77.8", "simple-git-hooks": "^2.11.1", "tailwindcss": "^3.4.10", - "tsx": "^4.17.0", + "tsx": "^4.19.0", "typescript": "^5.5.4", "uni-mini-router": "^0.1.6", "uni-read-pages-vite": "^0.0.6", "unplugin-auto-import": "^0.18.2", "vite": "^5.4.2", "vite-plugin-restart": "^0.4.1", - "weapp-tailwindcss": "^3.5.0" + "weapp-tailwindcss": "^3.5.1" }, "simple-git-hooks": { "pre-commit": "npx lint-staged", From a0b559f7d2f87e738c7b61560f0c44312e985a3f Mon Sep 17 00:00:00 2001 From: h_mo <596417202@qq.com> Date: Sat, 7 Sep 2024 23:52:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(build):=20=E4=BF=AE=E5=A4=8Dpnpm?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E5=87=BA=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/proxy.ts | 2 ++ build/vitePlugins.ts | 2 ++ package.json | 1 + vite.config.ts | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build/proxy.ts b/build/proxy.ts index 315f809..7c5f31c 100644 --- a/build/proxy.ts +++ b/build/proxy.ts @@ -1,3 +1,5 @@ +import type { ProxyOptions } from 'vite'; + /** * Configure according to the proxy list * @param proxyList diff --git a/build/vitePlugins.ts b/build/vitePlugins.ts index b3b8877..69a99fc 100644 --- a/build/vitePlugins.ts +++ b/build/vitePlugins.ts @@ -4,6 +4,7 @@ import { UnifiedViteWeappTailwindcssPlugin as uvtw } from 'weapp-tailwindcss/vit import autoImport from 'unplugin-auto-import/vite'; import viteRestart from 'vite-plugin-restart'; import { visualizer } from 'rollup-plugin-visualizer'; +import { nodeResolve } from '@rollup/plugin-node-resolve'; import { WeappTailwindcssDisabled, isH5 } from './platform'; interface VitePluginConfig { @@ -14,6 +15,7 @@ export function createVitePlugins({ isProd }: VitePluginConfig): PluginOption[] return [ // @ts-expect-error TODO uni() 会报错:uni is not a function,暂时使用此方式解决 uni?.default(), + nodeResolve(), uvtw({ rem2rpx: true, disabled: WeappTailwindcssDisabled, diff --git a/package.json b/package.json index fcdf355..a3ac90f 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "@dcloudio/vite-plugin-uni": "3.0.0-alpha-4020720240905001", "@egoist/tailwindcss-icons": "^1.8.1", "@iconify/json": "^2.2.245", + "@rollup/plugin-node-resolve": "^15.2.3", "@types/crypto-js": "^4.2.2", "@types/lodash-es": "^4.17.12", "@types/node": "^20.16.5", diff --git a/vite.config.ts b/vite.config.ts index 240169e..4636d7e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -48,7 +48,7 @@ export default defineConfig(async ({ mode }) => { host: true, // open: true, port: Number.parseInt(VITE_PORT!, 10), - proxy: resolveProxy([[VITE_PROXY_PREFIX, VITE_BASE_URL], [VITE_UPLOAD_PROXY_PREFIX, VITE_UPLOAD_URL]]), + proxy: resolveProxy([[VITE_PROXY_PREFIX!, VITE_BASE_URL!], [VITE_UPLOAD_PROXY_PREFIX!, VITE_UPLOAD_URL!]]), }, // 构建配置 build: {