Skip to content

Commit

Permalink
refactor: ♻️ 修改路径
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-czy committed Dec 19, 2023
1 parent 2d9c6b0 commit adb859a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/layouts/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { SizeType } from "antd/es/config-provider/SizeContext";
import { useDispatch, useSelector } from "@/store";
import { updateCollapsed } from "@/store/module/sidebar";
import { setComponentSize, setLanguage } from "@/store/module/global";
import ThemeComp from "@/components/layouts/components/Theme/index";
import FullScreen from "@/components/layouts/components/FullScreen";
import ThemeComp from "../Theme/index";

Check failure on line 20 in src/components/layouts/components/Header/index.tsx

View workflow job for this annotation

GitHub Actions / build-and-deploy

Cannot find module '../Theme/index' or its corresponding type declarations.
import FullScreen from "../FullScreen/index";
import SvgIcon from "@/components/svgIcon";

const { Header } = Layout;
Expand Down
5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@
"noEmit": true,
"jsx": "react-jsx",
// 解析非相对模块名的基准目录
"baseUrl": "./",
"baseUrl": ".",
// 模块名到基于 baseUrl的路径映射的列表。
"paths": {
"@": [
"src"
],
"@/*": [
"src/*"
]
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default defineConfig((mode: ConfigEnv): UserConfig => {
resolve: {
// 路径别名
alias: {
"@": resolve(__dirname, "./src")
"@": resolve(__dirname, "src")
},
extensions: [".mjs", ".js", ".ts", ".tsx", ".json"]
},
Expand Down

0 comments on commit adb859a

Please sign in to comment.