1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2025-07-02 00:59:23 +00:00

Revert "添加壁纸模式,不构建sw"

This reverts commit 183214305540d86e56c34316ec52523d04af4ab2.
This commit is contained in:
SunWuyuan 2025-06-11 16:41:22 +08:00
parent 1832143055
commit cbddbeb0a1
No known key found for this signature in database
GPG Key ID: A6A54CF66F56BB64

View File

@ -13,21 +13,15 @@ import { defineConfig } from 'vite'
import { fileURLToPath, URL } from 'node:url'
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
// 从命令行参数中获取 wallpaper 模式
const isWallpaper = mode === 'wallpaper';
const plugins = [
export default defineConfig({
base: './',
plugins: [
VueRouter(),
Layouts(),
Vue({
template: { transformAssetUrls }
})
];
// 只在非壁纸模式下启用 PWA
if (!isWallpaper) {
plugins.push(VitePWA({
}),
VitePWA({
registerType: 'autoUpdate',
devOptions: {
navigateFallback: 'index.html',
@ -179,10 +173,7 @@ export default defineConfig(({ mode }) => {
},
],
}
}));
}
plugins.push(
}),
// https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
Vuetify({
autoImport: true,
@ -208,12 +199,8 @@ export default defineConfig(({ mode }) => {
enabled: true,
},
vueTemplate: true,
})
);
return {
base: './',
plugins,
}),
],
define: { 'process.env': {} },
resolve: {
alias: {
@ -239,5 +226,4 @@ export default defineConfig(({ mode }) => {
},
},
},
}
})