From 97fd3581ac0338560681131933c4f8bdabc19209 Mon Sep 17 00:00:00 2001 From: soomin9106 Date: Sat, 15 Jun 2024 19:34:36 +0900 Subject: [PATCH 1/7] chore: add gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a3062fe6..c2442250 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # dependencies .env .env.production +.env.development /node_modules /.pnp .pnp.js From 081b321c1a797bd14a875ac08d377a601ff2c3af Mon Sep 17 00:00:00 2001 From: soomin9106 Date: Sat, 15 Jun 2024 19:35:54 +0900 Subject: [PATCH 2/7] chore: add runtime --- src/app/layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 2f2cda2d..e11ba3af 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -17,7 +17,7 @@ export const metadata: Metadata = { description: "매일 아침마다 경제 아티클과 문제를 보내드려요!", }; -// export const runtime = 'edge'; // TBD: 개발환경과 분리 +export const runtime = 'edge'; // TBD: 개발환경과 분리 const pretendard = localFont({ src: [ From 0dffa2ec881b8fe8271775116b6819598b4f4dfd Mon Sep 17 00:00:00 2001 From: soomin9106 Date: Sat, 15 Jun 2024 19:48:29 +0900 Subject: [PATCH 3/7] fix: remove unused variable --- src/api/api-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/api-config.ts b/src/api/api-config.ts index 6fb52262..6b6b5013 100644 --- a/src/api/api-config.ts +++ b/src/api/api-config.ts @@ -35,7 +35,7 @@ axiosInstance.interceptors.response.use( return response; }, async function (error) { - const { config, response } = error; + const { config } = error; return axios(config); }, ); From 757fc2e40fa69fd98d90cc05bbf71c704f9dcef1 Mon Sep 17 00:00:00 2001 From: soomin9106 Date: Sat, 15 Jun 2024 19:54:09 +0900 Subject: [PATCH 4/7] chore: error to warn --- .eslintrc.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 3b470e2d..bc8590f2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -27,8 +27,8 @@ "rules": { "react/react-in-jsx-scope": "off", "no-unused-vars": "off", - "import/no-duplicates": "error", - "unused-imports/no-unused-imports": "error", + "import/no-duplicates": "warn", + "unused-imports/no-unused-imports": "warn", "@typescript-eslint/no-unused-vars": "warn", "simple-import-sort/exports": "warn", "react/display-name": "off", From e3710d7335add2ca9416f6c423f64e070b504f77 Mon Sep 17 00:00:00 2001 From: soomin9106 Date: Sat, 15 Jun 2024 22:26:15 +0900 Subject: [PATCH 5/7] ci: add dotenv-cli package --- package.json | 6 ++++-- pnpm-lock.yaml | 13 +++++++++++++ src/app/layout.tsx | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index afea9990..a0b97834 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,9 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev", - "prebuild": "node generate-runtime-config.mjs", + "dev:local": "dotenv -e .env.local -- next dev", + "dev:development": "dotenv -e .env.development -- next dev", + "dev:production": "dotenv -e .env.production -- next dev", "build": "next build", "start": "next start", "lint": "next lint", @@ -56,6 +57,7 @@ "@typescript-eslint/eslint-plugin": "^7.11.0", "@typescript-eslint/parser": "^7.11.0", "@vitejs/plugin-react": "^4.3.0", + "dotenv-cli": "^7.4.2", "eslint": "^8", "eslint-config-next": "14.2.3", "eslint-config-prettier": "^9.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af7b3cd4..96ffb3fc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -127,6 +127,9 @@ devDependencies: '@vitejs/plugin-react': specifier: ^4.3.0 version: 4.3.0(vite@5.2.13) + dotenv-cli: + specifier: ^7.4.2 + version: 7.4.2 eslint: specifier: ^8 version: 8.57.0 @@ -6981,6 +6984,16 @@ packages: tslib: 2.6.2 dev: true + /dotenv-cli@7.4.2: + resolution: {integrity: sha512-SbUj8l61zIbzyhIbg0FwPJq6+wjbzdn9oEtozQpZ6kW2ihCcapKVZj49oCT3oPM+mgQm+itgvUQcG5szxVrZTA==} + hasBin: true + dependencies: + cross-spawn: 7.0.3 + dotenv: 16.4.5 + dotenv-expand: 10.0.0 + minimist: 1.2.8 + dev: true + /dotenv-expand@10.0.0: resolution: {integrity: sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==} engines: {node: '>=12'} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e11ba3af..32703cdc 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -17,7 +17,7 @@ export const metadata: Metadata = { description: "매일 아침마다 경제 아티클과 문제를 보내드려요!", }; -export const runtime = 'edge'; // TBD: 개발환경과 분리 +// export const runtime = 'edge' // TBD: 개발환경과 분리 const pretendard = localFont({ src: [ From 76105fb6234f484450da68093f20f0619c0a9da9 Mon Sep 17 00:00:00 2001 From: soomin9106 Date: Sat, 15 Jun 2024 22:55:58 +0900 Subject: [PATCH 6/7] fix: modify env path --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a0b97834..e5919bf7 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "version": "0.1.0", "private": true, "scripts": { - "dev:local": "dotenv -e .env.local -- next dev", - "dev:development": "dotenv -e .env.development -- next dev", - "dev:production": "dotenv -e .env.production -- next dev", + "dev:local": "dotenv -e environments/.env.local -- next dev", + "dev:development": "dotenv -e environments/.env.development -- next dev", + "dev:production": "dotenv -e environments/.env.production -- next dev", "build": "next build", "start": "next start", "lint": "next lint", From 1d343311de2b30b983a94caba2405e7401b4adf9 Mon Sep 17 00:00:00 2001 From: soomin9106 Date: Sun, 16 Jun 2024 14:21:08 +0900 Subject: [PATCH 7/7] fix: runtime --- src/app/layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 32703cdc..8f4d6cdc 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -17,7 +17,7 @@ export const metadata: Metadata = { description: "매일 아침마다 경제 아티클과 문제를 보내드려요!", }; -// export const runtime = 'edge' // TBD: 개발환경과 분리 +export const runtime = 'edge' // TBD: 개발환경과 분리 const pretendard = localFont({ src: [