Sen descrición

zhangxing 71ba9e4ac1 push %!s(int64=3) %!d(string=hai) anos
.vscode 79661886f8 push %!s(int64=3) %!d(string=hai) anos
src 46815c227b 分类页面tag按钮优化 %!s(int64=3) %!d(string=hai) anos
.env.development f977f95827 配置接口文件 %!s(int64=3) %!d(string=hai) anos
.env.production 71ba9e4ac1 push %!s(int64=3) %!d(string=hai) anos
.eslintrc.js 79661886f8 push %!s(int64=3) %!d(string=hai) anos
.gitignore 79661886f8 push %!s(int64=3) %!d(string=hai) anos
README.md 71ba9e4ac1 push %!s(int64=3) %!d(string=hai) anos
components.d.ts 79661886f8 push %!s(int64=3) %!d(string=hai) anos
index.html 79661886f8 push %!s(int64=3) %!d(string=hai) anos
package-lock.json 79661886f8 push %!s(int64=3) %!d(string=hai) anos
package.json 79661886f8 push %!s(int64=3) %!d(string=hai) anos
prettier.config.js 79661886f8 push %!s(int64=3) %!d(string=hai) anos
tsconfig.json 79661886f8 push %!s(int64=3) %!d(string=hai) anos
tsconfig.node.json 79661886f8 push %!s(int64=3) %!d(string=hai) anos
vite.config.ts 79661886f8 push %!s(int64=3) %!d(string=hai) anos
yarn.lock 79661886f8 push %!s(int64=3) %!d(string=hai) anos

README.md

Vue 3 + TypeScript + Vite

js文件下载

https://blog.csdn.net/weixin_41217541/article/details/109893272?spm=1001.2101.3001.6650.5&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-5-109893272-blog-112007458.pc_relevant_aa&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-5-109893272-blog-112007458.pc_relevant_aa&utm_relevant_index=10

js 下载

https://blog.csdn.net/weixin_43299180/article/details/112007458

只刷新一次页面

`if (location.href.indexOf("#reloaded") === -1) {

location.href = location.href + "#reloaded";
location.reload();

}`

vite + vue3 低版本浏览器兼容配置

  1. 安装兼容插件 yarn add @vitejs/plugin-legacy
  2. vite.config.ts 中引入 import legacy from '@vitejs/plugin-legacy' plugins:[ legacy({ targets: ['chrome 50', 'ie >= 11'], //兼容最低版本号50(UC浏览器55) additionalLegacyPolyfills: ['regenerator-runtime/runtime'], // regenerator-runtime/runtime @dian/polyfill renderLegacyChunks: true, polyfills: [ 'es.symbol', 'es.array.filter', 'es.promise', 'es.promise.finally', 'es/map', 'es/set', 'es.array.for-each', 'es.object.define-properties', 'es.object.define-property', 'es.object.get-own-property-descriptor', 'es.object.get-own-property-descriptors', 'es.object.keys', 'es.object.to-string', 'web.dom-collections.for-each', 'esnext.global-this', 'esnext.string.match-all', // // 这个无法处理 // 'es.string.replace-all' ], modernPolyfills: ['es.string.replace-all'] }) ]

vite打包时会报错

terser not found. Since Vite v3, terser has become an optional dependency. You need to install it.

解决办法:

yarn add terser --legacy-peer-deps 再重新打包