chore: sync local changes (2026-03-12)
This commit is contained in:
@@ -4,11 +4,20 @@ import { createRoot } from 'react-dom/client'
|
||||
import './index.css'
|
||||
import App from './App.jsx'
|
||||
import ErrorBoundary from './components/ErrorBoundary.jsx'
|
||||
import { registerSW } from 'virtual:pwa-register'
|
||||
|
||||
console.log('[MengyaNote] 应用启动...');
|
||||
console.log('[MengyaNote] 环境:', import.meta.env.MODE);
|
||||
console.log('[MengyaNote] API地址:', import.meta.env.VITE_API_BASE || 'http://192.168.1.233:2424');
|
||||
|
||||
// PWA:注册 Service Worker,有新版本时自动更新
|
||||
registerSW({
|
||||
onNeedRefresh() {},
|
||||
onOfflineReady() {
|
||||
console.log('[MengyaNote] 内容已缓存,可离线使用');
|
||||
}
|
||||
});
|
||||
|
||||
createRoot(document.getElementById('root')).render(
|
||||
<StrictMode>
|
||||
<ErrorBoundary>
|
||||
|
||||
Reference in New Issue
Block a user