Unverified Commit 5d8b8c37 authored by boojack's avatar boojack Committed by GitHub

chore: upgrade vite (#728)

* chore: upgrade vite

* Revert "chore: remove lazy import component (#724)"

This reverts commit 688dc230.
parent 564f20d1
......@@ -3,7 +3,6 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"serve": "vite preview",
"lint": "eslint --ext .js,.ts,.tsx, src",
"test": "jest --passWithNoTests"
},
......@@ -36,7 +35,7 @@
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"@vitejs/plugin-react": "^2.0.0",
"@vitejs/plugin-react-swc": "^3.0.0",
"autoprefixer": "^10.4.2",
"eslint": "^8.4.1",
"eslint-config-prettier": "^8.3.0",
......@@ -49,6 +48,6 @@
"prettier": "2.5.1",
"ts-jest": "^29.0.3",
"typescript": "^4.3.2",
"vite": "^3.0.0"
"vite": "^4.0.0"
}
}
import { createBrowserRouter, redirect } from "react-router-dom";
import { lazy } from "react";
import { isNullorUndefined } from "../helpers/utils";
import { globalService, userService } from "../services";
import Auth from "../pages/Auth";
import Explore from "../pages/Explore";
import Home from "../pages/Home";
import MemoDetail from "../pages/MemoDetail";
const Auth = lazy(() => import("../pages/Auth"));
const Explore = lazy(() => import("../pages/Explore"));
const Home = lazy(() => import("../pages/Home"));
const MemoDetail = lazy(() => import("../pages/MemoDetail"));
const router = createBrowserRouter([
{
......
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import react from "@vitejs/plugin-react-swc";
// https://vitejs.dev/config/
export default defineConfig({
......@@ -8,15 +8,15 @@ export default defineConfig({
host: "0.0.0.0",
port: 3000,
proxy: {
"/api": {
"^/api": {
target: "http://localhost:8080/",
changeOrigin: true,
},
"/o/": {
"^/o/": {
target: "http://localhost:8080/",
changeOrigin: true,
},
"/h/": {
"^/h/": {
target: "http://localhost:8080/",
changeOrigin: true,
},
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment