提交 fd0495f5 authored 作者: zengzhe's avatar zengzhe

feat: 初步替换完成,能够dev

上级 c2471100
import { pluginBabel } from '@rsbuild/plugin-babel'
import { pluginVue } from '@rsbuild/plugin-vue'
import { pluginVueJsx } from '@rsbuild/plugin-vue-jsx'
import { pluginLess } from '@rsbuild/plugin-less'
export const createPlugins = () => {
return [
pluginBabel({
include: /\.(?:jsx|tsx)$/
}),
pluginVue(),
pluginVueJsx(),
pluginLess()
]
}
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vue.svg" /> <link rel="icon" type="image/svg+xml" href="/vue.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%- title %></title>
</head> </head>
<body> <body>
<div id="app"> <div id="app">
...@@ -17,6 +16,7 @@ ...@@ -17,6 +16,7 @@
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.loading-box { .loading-box {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -25,12 +25,14 @@ ...@@ -25,12 +25,14 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.loading-box .loading-wrap { .loading-box .loading-wrap {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 98px; padding: 98px;
} }
.dot { .dot {
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
...@@ -41,6 +43,7 @@ ...@@ -41,6 +43,7 @@
transform: rotate(45deg); transform: rotate(45deg);
animation: ant-rotate 1.2s infinite linear; animation: ant-rotate 1.2s infinite linear;
} }
.dot i { .dot i {
position: absolute; position: absolute;
display: block; display: block;
...@@ -53,20 +56,24 @@ ...@@ -53,20 +56,24 @@
transform-origin: 50% 50%; transform-origin: 50% 50%;
animation: ant-spin-move 1s infinite linear alternate; animation: ant-spin-move 1s infinite linear alternate;
} }
.dot i:nth-child(1) { .dot i:nth-child(1) {
top: 0; top: 0;
left: 0; left: 0;
} }
.dot i:nth-child(2) { .dot i:nth-child(2) {
top: 0; top: 0;
right: 0; right: 0;
animation-delay: 0.4s; animation-delay: 0.4s;
} }
.dot i:nth-child(3) { .dot i:nth-child(3) {
right: 0; right: 0;
bottom: 0; bottom: 0;
animation-delay: 0.8s; animation-delay: 0.8s;
} }
.dot i:nth-child(4) { .dot i:nth-child(4) {
bottom: 0; bottom: 0;
left: 0; left: 0;
...@@ -100,6 +107,5 @@ ...@@ -100,6 +107,5 @@
if (globalState.isDark) html.style.background = '#141414' if (globalState.isDark) html.style.background = '#141414'
} }
</script> </script>
<script type="module" src="/src/main.ts"></script>
</body> </body>
</html> </html>
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
"url": "https://code.seevin.com/project-collaboration-platform/admin-web" "url": "https://code.seevin.com/project-collaboration-platform/admin-web"
}, },
"scripts": { "scripts": {
"dev": "vite", "dev": "rsbuild dev --env-mode development",
"serve": "vite", "serve": "rsbuild dev --env-mode development",
"build": "vue-tsc --noEmit && vite build --mode test", "build": "rsbuild build",
"build:prod": "vue-tsc --noEmit && vite build --mode production", "preview": "rsbuild preview",
"build:prod": "vue-tsc --noEmit && rsbuild build --mode production",
"type:check": "vue-tsc --noEmit --skipLibCheck", "type:check": "vue-tsc --noEmit --skipLibCheck",
"preview": "npm run build:dev && vite preview",
"lint": "eslint --ext .vue,.js,.jsx,.ts,.tsx ./ --max-warnings 0", "lint": "eslint --ext .vue,.js,.jsx,.ts,.tsx ./ --max-warnings 0",
"lint:fix": "eslint --ext .vue,.js,jsx,.ts,.tsx ./ --max-warnings 0 --fix", "lint:fix": "eslint --ext .vue,.js,jsx,.ts,.tsx ./ --max-warnings 0 --fix",
"prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"", "prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
...@@ -52,14 +52,16 @@ ...@@ -52,14 +52,16 @@
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^19.5.0", "@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0", "@commitlint/config-conventional": "^19.5.0",
"@rsbuild/core": "^1.1.13",
"@rsbuild/plugin-babel": "^1.0.3",
"@rsbuild/plugin-less": "^1.1.0",
"@rsbuild/plugin-vue": "^1.0.5",
"@rsbuild/plugin-vue-jsx": "^1.1.0",
"@rushstack/eslint-patch": "^1.8.0", "@rushstack/eslint-patch": "^1.8.0",
"@types/js-md5": "^0.7.2", "@types/js-md5": "^0.7.2",
"@types/lodash-es": "^4.17.12", "@types/lodash-es": "^4.17.12",
"@types/nprogress": "^0.2.3", "@types/nprogress": "^0.2.3",
"@types/qs": "^6.9.16", "@types/qs": "^6.9.16",
"@vitejs/plugin-legacy": "^4.0.5",
"@vitejs/plugin-vue": "4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0", "@vue/eslint-config-typescript": "^13.0.0",
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.20",
...@@ -80,12 +82,6 @@ ...@@ -80,12 +82,6 @@
"typescript": "5.6.2", "typescript": "5.6.2",
"unplugin-auto-import": "^0.18.3", "unplugin-auto-import": "^0.18.3",
"unplugin-vue-components": "^0.27.4", "unplugin-vue-components": "^0.27.4",
"vite": "4.5.5",
"vite-plugin-checker": "^0.8.0",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-html": "^3.2.2",
"vite-plugin-svg-icons": "^2.0.1",
"vue-tsc": "2.0.29" "vue-tsc": "2.0.29"
}, },
"engines": { "engines": {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论