Skip to content
4 changes: 2 additions & 2 deletions src/app/main.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App.tsx";
import "../styles/reset.css.ts";
import "../styles/global.css.ts";
import "@/styles/reset.css.ts";
import "@/styles/global.css.ts";

createRoot(document.getElementById("root")!).render(
<StrictMode>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/home-page.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { vars } from '../../styles/theme.css';
import { vars } from '@/styles/theme.css';
import { style } from '@vanilla-extract/css';

export const main = style({
Expand Down
13 changes: 13 additions & 0 deletions src/shared/types/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
declare module '*.css' {
// adjust the shape instead of `any` if you know the exact structure
export const vars: Record<string, any>;
const classes: { [key: string]: string };
export default classes;
}

declare module '*.css.ts' {
// tighten these types to match your actual exports (vars shape, classes, etc.)
export const vars: Record<string, any>;
const classes: { [key: string]: string };
export default classes;
}
10 changes: 9 additions & 1 deletion tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@
"types": ["vite/client"],
"skipLibCheck": true,

"composite": true,
"declaration" : true,
"declarationMap": true,
"incremental": true,
"outDir": "dist",

/* Bundler mode */
"moduleResolution": "bundler",
"allowJs": true,
"allowImportingTsExtensions": true,
"emitDeclarationOnly": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
// "noEmit": true,
"jsx": "react-jsx",

/* Linting */
Expand Down
14 changes: 14 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
"esModuleInterop": true,
"target": "es2022",
"module": "ESnext",
"moduleResolution": "bundler",
"jsx": "react-jsx",
"skipLibCheck": true
},

"include": ["src"],
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
Expand Down
10 changes: 9 additions & 1 deletion tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@
"types": ["node"],
"skipLibCheck": true,

"composite": true,
"declaration" : true,
"declarationMap": true,
"incremental": true,
"outDir": "dist",

/* Bundler mode */
"moduleResolution": "bundler",

"allowImportingTsExtensions": true,
"emitDeclarationOnly": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
// "noEmit": true,

/* Linting */
"strict": true,
Expand Down
1 change: 1 addition & 0 deletions tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"root":["./src/vite-env.d.ts","./src/app/app.tsx","./src/app/main.tsx","./src/pages/error/error-page.tsx","./src/pages/home/home-page.css.ts","./src/pages/home/home-page.tsx","./src/pages/login/login-page.tsx","./src/shared/api/axios.ts","./src/shared/assets/svg/index.ts","./src/shared/components/button/button.css.ts","./src/shared/components/button/button.tsx","./src/shared/components/input/input.css.ts","./src/shared/components/input/input.tsx","./src/shared/router/index.tsx","./src/shared/router/path.ts","./src/shared/types/global.d.ts","./src/styles/global.css.ts","./src/styles/reset.css.ts","./src/styles/theme.css.ts"],"version":"5.9.3"}
14 changes: 10 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import svgr from "vite-plugin-svgr";
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import svgr from 'vite-plugin-svgr';
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';

// https://vite.dev/config/
export default defineConfig({
Expand All @@ -14,4 +15,9 @@ export default defineConfig({
react(),
vanillaExtractPlugin(),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
});