Skip to content

Commit 36663b1

Browse files
author
sunlin92
committed
refactor:迁移到vite8
1 parent 51277f2 commit 36663b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+5821
-528
lines changed

.env.development

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
ENV = 'development'
2-
3-
VUE_APP_BASE_URL = 'http://localhost:5000/'
1+
VITE_BASE_URL = 'http://localhost:5000/'

.env.production

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
2-
3-
VUE_APP_BASE_URL = 'http://localhost:5000/'
1+
VITE_BASE_URL = 'http://localhost:5000/'

babel.config.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

public/index.html renamed to index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
7-
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
7+
<link rel="icon" href="/favicon.ico" />
88
<link rel="stylesheet" type="text/css" href="./iconfont.css" />
99
<script src="//at.alicdn.com/t/font_1104271_so151lbumpq.js"></script>
1010
<title>lin-cms</title>
@@ -61,7 +61,7 @@
6161
left: 0;
6262
border-radius: 3px;
6363
}
64-
64+
6565

6666
@keyframes rotate-square-2-animate {
6767
17% {
@@ -100,6 +100,6 @@
100100
<img src="./static/img/logo.png" alt="" class="loader-logo">
101101
</div>
102102
<div id="app"></div>
103-
<!-- built files will be auto injected -->
103+
<script type="module" src="/src/main.js"></script>
104104
</body>
105-
</html>
105+
</html>

package.json

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
"version": "0.4.3",
44
"license": "MIT",
55
"scripts": {
6-
"serve": "node script/plugin-get-config.js && vue-cli-service serve",
7-
"build": "node script/plugin-get-config.js && vue-cli-service build",
8-
"test:unit": "vue-cli-service test:unit",
9-
"lint": "vue-cli-service lint",
6+
"serve": "vite",
7+
"build": "vite build",
8+
"preview": "vite preview",
9+
"lint": "eslint src --ext .js,.vue",
1010
"commit": "git add . && git-cz",
1111
"plugin:init": "node script/plugin-init.js",
1212
"plugin:new": "node script/plugin-new.js",
1313
"plugin:reconfig": "node script/plugin-get-config.js"
1414
},
1515
"dependencies": {
1616
"@babel/polyfill": "^7.4.4",
17-
"@element-plus/icons-vue": "^2.1.0",
17+
"@element-plus/icons-vue": "^2.3.2",
1818
"@tinymce/tinymce-vue": "^4.0.0",
19-
"axios": "^0.24.0",
19+
"axios": "^1.15.0",
2020
"core-js": "^3.23.5",
2121
"dayjs": "^1.10.4",
22-
"element-plus": "^2.3.8",
22+
"element-plus": "^2.13.6",
2323
"event-source-polyfill": "^1.0.7",
2424
"fastscan": "^1.0.4",
2525
"good-storage": "^1.1.0",
@@ -30,26 +30,21 @@
3030
"photoswipe": "^4.1.2",
3131
"screenfull": "^4.2.0",
3232
"swiper": "^6.4.5",
33-
"vue": "^3.2.24",
33+
"vue": "^3.5.32",
3434
"vue-picture-cropper": "^0.1.9",
35-
"vue-router": "^4.0.10",
36-
"vuex": "^4.0.2",
37-
"vuex-persist": "^2.0.1",
35+
"vue-router": "5.0.4",
36+
"pinia": "^2.1.0",
37+
"pinia-plugin-persistedstate": "^3.2.0",
3838
"yarn": "^1.22.19"
3939
},
4040
"devDependencies": {
4141
"@babel/core": "^7.11.4",
4242
"@babel/eslint-parser": "^7.17.0",
4343
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
4444
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
45-
"@vue/cli-plugin-babel": "^5.0.3",
46-
"@vue/cli-plugin-eslint": "^5.0.3",
47-
"@vue/cli-plugin-unit-jest": "^5.0.3",
48-
"@vue/cli-service": "^5.0.3",
49-
"@vue/compiler-sfc": "^3.2.0",
50-
"@vue/eslint-config-airbnb": "^6.0.0",
51-
"@vue/test-utils": "^2.0.0-beta.8",
52-
"babel-jest": "^26.3.0",
45+
"@vitejs/plugin-vue": "^6.0.5",
46+
"@vue/compiler-sfc": "^3.5.32",
47+
"autoprefixer": "^10.4.27",
5348
"babel-plugin-component": "^1.1.1",
5449
"chalk": "^2.4.2",
5550
"child_process": "^1.0.2",
@@ -70,6 +65,7 @@
7065
"semver": "^6.2.0",
7166
"shelljs": "^0.8.5",
7267
"validate-npm-package-name": "^3.0.0",
68+
"vite": "^8.0.8",
7369
"yaml-front-matter": "^4.0.0"
7470
},
7571
"browserslist": [
@@ -88,7 +84,7 @@
8884
"lint-staged": {
8985
"*.{js,vue}": [
9086
"prettier --write",
91-
"vue-cli-service lint",
87+
"eslint",
9288
"git add"
9389
]
9490
}

0 commit comments

Comments
 (0)