diff --git a/admin/.env b/admin/.env index 8c9b615..6e70bad 100644 --- a/admin/.env +++ b/admin/.env @@ -1,3 +1,4 @@ HOST=0.0.0.0 BABEL_CACHE=none -#DEBUG=umiui* \ No newline at end of file +#DEBUG=umiui* +#ANALYZE=1 \ No newline at end of file diff --git a/admin/config/config.ts b/admin/config/config.ts index a28c586..133171c 100644 --- a/admin/config/config.ts +++ b/admin/config/config.ts @@ -386,8 +386,10 @@ export default defineConfig({ title: false, ignoreMomentLocale: true, proxy: proxy[REACT_APP_ENV || 'dev'], + base: '/', + publicPath: './', // 发布路径采用相对地址 manifest: { - basePath: '/', + basePath: './', }, // Fast Refresh 热更新 fastRefresh: {}, diff --git a/admin/package.json b/admin/package.json index bd2bae2..fa91771 100644 --- a/admin/package.json +++ b/admin/package.json @@ -5,7 +5,7 @@ "description": "An out-of-box UI solution for enterprise applications", "scripts": { "analyze": "cross-env ANALYZE=1 umi build", - "build": "umi build", + "build": "cross-env NODE_OPTIONS=--openssl-legacy-provider umi build", "deploy": "npm run build && npm run gh-pages", "dev": "npm run start:dev", "gh-pages": "gh-pages -d dist", diff --git a/web/config/config.ts b/web/config/config.ts index 1620f0a..e4d4849 100644 --- a/web/config/config.ts +++ b/web/config/config.ts @@ -243,8 +243,10 @@ export default defineConfig({ title: false, ignoreMomentLocale: true, proxy: proxy[REACT_APP_ENV || 'dev'], + base: '/', + publicPath: './', // 发布路径采用相对地址 manifest: { - basePath: '/', + basePath: './', }, // Fast Refresh 热更新 fastRefresh: {}, diff --git a/web/package.json b/web/package.json index 4aec567..885ee1a 100644 --- a/web/package.json +++ b/web/package.json @@ -5,7 +5,7 @@ "description": "An out-of-box UI solution for enterprise applications", "scripts": { "analyze": "cross-env ANALYZE=1 umi build", - "build": "umi build", + "build": "cross-env NODE_OPTIONS=--openssl-legacy-provider umi build", "deploy": "npm run build && npm run gh-pages", "dev": "npm run start:dev", "gh-pages": "gh-pages -d dist",