Skip to content

Commit

Permalink
config: vite-tsconfig-paths 라이브러리 설치
Browse files Browse the repository at this point in the history
  • Loading branch information
gihwan-dev authored and gihwan-dev committed Dec 23, 2024
1 parent 0610433 commit 2f6db83
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 9 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"prettier": "^3.4.2",
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^2.1.8"
}
}
41 changes: 41 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/constants/htmlEventsName.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export const htmlEventNames = [
"click",
"change",
"submit",
"focus",
"blur",
"mouseover",
"keydown",
"keyup",
"focus",
] as const;
3 changes: 3 additions & 0 deletions src/types/event.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { htmlEventNames } from "@/constants/htmlEventsName";

export type HTMLEventName = (typeof htmlEventNames)[number];
11 changes: 2 additions & 9 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import { defineConfig as defineTestConfig, mergeConfig } from "vitest/config";
import { defineConfig } from "vite";
import path from "path";
import tsconfigPaths from "vite-tsconfig-paths";

export default mergeConfig(
defineConfig({
resolve: {
alias: [
{
find: "@",
replacement: path.resolve(__dirname, "src"),
},
],
},
plugins: [tsconfigPaths()],
esbuild: {
jsxFactory: "createVNode",
},
Expand Down

0 comments on commit 2f6db83

Please sign in to comment.