feat: 初始提交
This commit is contained in:
40
vite.config.ts
Normal file
40
vite.config.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
emptyOutDir: true,
|
||||
outDir: "../../dist/web",
|
||||
rolldownOptions: {
|
||||
output: {
|
||||
codeSplitting: {
|
||||
groups: [
|
||||
{
|
||||
name: "vendor-react",
|
||||
test: /[\\/]node_modules[\\/](react|react-dom|scheduler)[\\/]/,
|
||||
},
|
||||
{
|
||||
name: "vendor-router",
|
||||
test: /[\\/]node_modules[\\/](react-router)[\\/]/,
|
||||
},
|
||||
{
|
||||
name: "vendor-tdesign",
|
||||
test: /[\\/]node_modules[\\/](tdesign-react|tdesign-icons-react)[\\/]/,
|
||||
},
|
||||
{
|
||||
name: "vendor-chart",
|
||||
test: /[\\/]node_modules[\\/](recharts|d3-.*)[\\/]/,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [react()],
|
||||
root: "src/web",
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": "http://127.0.0.1:3000",
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user