fix: global css miss

This commit is contained in:
jialin
2024-06-21 00:02:58 +08:00
parent 8c402e88fb
commit b523076a5d
2 changed files with 13 additions and 13 deletions
+5 -5
View File
@@ -19,11 +19,11 @@ export default defineConfig({
src: `/js/umi.${t}.js` src: `/js/umi.${t}.js`
} }
], ],
cssLoader: { // cssLoader: {
modules: { // modules: {
localIdentName: 'css/[name]__[local]___[hash:base64:5]' // localIdentName: 'css/[name]__[local]___[hash:base64:5]'
} // }
}, // },
chainWebpack(config: any) { chainWebpack(config: any) {
config.plugin('mini-css-extract-plugin').tap((args: any) => [ config.plugin('mini-css-extract-plugin').tap((args: any) => [
{ {
+8 -8
View File
@@ -23,14 +23,14 @@ export async function getInitialState() {
return undefined; return undefined;
}; };
if (![loginPath].includes(location.pathname)) { // if (![loginPath].includes(location.pathname)) {
const currentUser = await fetchUserInfo(); // const currentUser = await fetchUserInfo();
return { // return {
fetchUserInfo, // fetchUserInfo,
name: 'admin', // name: 'admin',
...currentUser // ...currentUser
}; // };
} // }
return { return {
fetchUserInfo, fetchUserInfo,
name: 'admin' name: 'admin'