Skip to content

Commit

Permalink
低端机处理,(es6转es5)
Browse files Browse the repository at this point in the history
  • Loading branch information
tclxsq08210 committed May 16, 2022
1 parent f2e13fa commit 2f3cb89
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
5. 过期缓存
6. 网络请求(axios)
7. autoprefixer
8. 移动端适配(vw)
8. 移动端适配(vw)
9. 低端机处理,(es6转es5)
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"vue-router": "^4.0.14"
},
"devDependencies": {
"@vitejs/plugin-legacy": "^1.8.1",
"@vitejs/plugin-vue": "^2.2.0",
"autoprefixer": "^10.4.4",
"postcss-px-to-viewport": "^1.1.1",
Expand Down
15 changes: 11 additions & 4 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import legacy from '@vitejs/plugin-legacy';

export default defineConfig({
plugins: [vue()]
})
base: "/xxxxxxxxx/", // 子路径
plugins: [
vue(),
legacy({
targets: ["> 1%", "last 2 versions", "not ie <= 8"]
})
],
});

0 comments on commit 2f3cb89

Please sign in to comment.