feat: 优化打包设置

This commit is contained in:
landaiqing
2024-05-05 23:24:35 +08:00
parent f5d2fd0062
commit 08caaa9a90
3 changed files with 20 additions and 33 deletions

View File

@@ -6,8 +6,7 @@ import SvgIcon from '@/components/SvgIcon/SvgIcon.tsx'
const HomeIndex: React.FC = () => {
useEffect(() => {
document.body.classList.add('body')
window.onload = function () {
if (!CSS.supports('animation-timeline: scroll()')) {
if (!CSS.supports('animation-timeline: scroll()')) {
// const SPAN = 'max(45vw, 260px)';
const CONFIG = [
{
@@ -190,8 +189,6 @@ const HomeIndex: React.FC = () => {
},
})
}
}
return () => {
document.body.classList.remove('body')
}

View File

@@ -6,6 +6,7 @@ import routeConfig from './router'
import 'virtual:svg-icons-register'
import { Provider as MobxProvider } from 'mobx-react'
import { RootStore } from '@/store'
import 'vite/modulepreload-polyfill'
const router = createBrowserRouter(routeConfig)
ReactDOM.createRoot(document.getElementById('root')!).render(
// <React.StrictMode>