看看官方文档:plugin-web-update-notification// vite.config.ts import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { webUpdateNotice } from '@plugin-web-update-notification/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue(), webUpdateNotice({ logVersion: true, }), ] })webpack:// vue.config.js(vue-cli project) const { WebUpdateNotificationPlugin } = require('@plugin-web-update-notification/webpack') const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ // ...other config configureWebpack: { plugins: [ new WebUpdateNotificationPlugin({ logVersion: true, }), ], }, })放main.js试试然后进网站看会不会提示更新
看看官方文档:plugin-web-update-notification
webpack:
放main.js试试
然后进网站看会不会提示更新