12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import { defineConfig } from "vite";
- import vue from "@vitejs/plugin-vue";
- import { VitePWA } from 'vite-plugin-pwa'
- const vueJsx = require('@vitejs/plugin-vue-jsx')
- const legacy = require('@vitejs/plugin-legacy')
- const proxyUrl = "https://test.dayaedu.com/"; // test 环境
- // https://vitejs.dev/config/
- export default defineConfig({
- base: "./",
- plugins: [
- vue(),
- vueJsx(),
- legacy({
- targets: ["> 0.25%, not dead"],
- ignoreBrowserslistConfig: true,
- }),
- VitePWA({
- injectRegister: 'networkfirst',
- workbox: {
- cleanupOutdatedCaches: true
- },
- base: './',
- manifest: {
- name: '管乐迷',
- short_name: '管乐迷',
- theme_color: '#01C1B5',
- icons: [
- {
- src: './pwa-192x192.png',
- sizes: '192x192',
- type: 'image/png',
- },
- {
- src: './pwa-512x512.png',
- sizes: '512x512',
- type: 'image/png',
- },
- ],
- },
- }),
- ],
- });
|