From b523076a5da823f0a9e62db1c4ebbc3163f19991 Mon Sep 17 00:00:00 2001 From: jialin Date: Fri, 21 Jun 2024 00:02:58 +0800 Subject: [PATCH] fix: global css miss --- config/config.ts | 10 +++++----- src/app.tsx | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/config/config.ts b/config/config.ts index 61ab16c5..4835d4ac 100644 --- a/config/config.ts +++ b/config/config.ts @@ -19,11 +19,11 @@ export default defineConfig({ src: `/js/umi.${t}.js` } ], - cssLoader: { - modules: { - localIdentName: 'css/[name]__[local]___[hash:base64:5]' - } - }, + // cssLoader: { + // modules: { + // localIdentName: 'css/[name]__[local]___[hash:base64:5]' + // } + // }, chainWebpack(config: any) { config.plugin('mini-css-extract-plugin').tap((args: any) => [ { diff --git a/src/app.tsx b/src/app.tsx index 084e7e43..0666fbed 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -23,14 +23,14 @@ export async function getInitialState() { return undefined; }; - if (![loginPath].includes(location.pathname)) { - const currentUser = await fetchUserInfo(); - return { - fetchUserInfo, - name: 'admin', - ...currentUser - }; - } + // if (![loginPath].includes(location.pathname)) { + // const currentUser = await fetchUserInfo(); + // return { + // fetchUserInfo, + // name: 'admin', + // ...currentUser + // }; + // } return { fetchUserInfo, name: 'admin'