Skip to content

Commit abfcdba

Browse files
committed
feat: 추가한 디렉토리를 패키지로 추가
1 parent 18ccb6e commit abfcdba

File tree

6 files changed

+31
-3
lines changed

6 files changed

+31
-3
lines changed

dotenv/.env.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
VITE_PYCONKR_SHOP_API_DOMAIN=https://shop-api.dev.pycon.kr
2+
VITE_PYCONKR_SHOP_CSRF_COOKIE_NAME=DEBUG_csrftoken

dotenv/.env.production

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
VITE_PYCONKR_SHOP_API_DOMAIN=https://shop-api.pycon.kr
2+
VITE_PYCONKR_SHOP_CSRF_COOKIE_NAME=csrftoken

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"@mdx-js/react": "^3.1.0",
2121
"@mdx-js/rollup": "^3.1.0",
2222
"@mui/material": "^7.0.2",
23+
"@pyconkr-common": "link:package/pyconkr-common",
24+
"@pyconkr-shop": "link:package/pyconkr-shop",
25+
"@src": "link:src",
2326
"@tanstack/react-query": "^5.72.2",
2427
"eslint-plugin-import": "^2.31.0",
2528
"eslint-plugin-jsx-a11y": "^6.10.2",

src/vite-env.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
11
/// <reference types="vite/client" />
2+
interface ViteTypeOptions {
3+
strictImportEnv: unknown;
4+
}
5+
6+
interface ImportMetaEnv {
7+
readonly VITE_PYCONKR_SHOP_API_DOMAIN: string;
8+
readonly VITE_PYCONKR_SHOP_CSRF_COOKIE_NAME: string;
9+
}
10+
11+
interface ImportMeta {
12+
readonly env: ImportMetaEnv;
13+
}

tsconfig.app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323
"noUncheckedSideEffectImports": true,
2424
"forceConsistentCasingInFileNames": false
2525
},
26-
"include": ["src"]
26+
"include": ["src", "package"]
2727
}

vite.config.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
import { defineConfig } from "vite";
2-
import react from "@vitejs/plugin-react";
31
import mdx from "@mdx-js/rollup";
2+
import react from "@vitejs/plugin-react";
3+
import path from 'path';
4+
import { defineConfig } from "vite";
45

56
// https://vite.dev/config/
67
export default defineConfig({
78
base: "/frontend/",
9+
envDir: "./dotenv",
810
plugins: [react(), mdx()],
11+
resolve: {
12+
alias: {
13+
'@pyconkr-common': path.resolve(__dirname, './package/pyconkr-common'),
14+
'@pyconkr-shop': path.resolve(__dirname, './package/pyconkr-shop'),
15+
'@src': path.resolve(__dirname, './src'),
16+
},
17+
},
918
});

0 commit comments

Comments
 (0)