Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: vite-node hmr 사용 중지, nodemon 사용 #669

Merged
merged 2 commits into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"scripts": {
"start": "npx vite-node src/server.ts",
"build": "pnpm --filter='@jiphyeonjeon-42/contracts' build",
"dev": "vite-node --watch src/server.ts",
"dev": "nodemon --watch src --watch ../contracts/dist --exec vite-node src/server.ts",
"standalone": "npm run build && npm run start",
"lint": "eslint --fix --ext .js,.ts src",
"check": "tsc --project ./tsconfig.prod.json --noEmit",
Expand All @@ -39,10 +39,11 @@
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"jest": "^29.5.0",
"jest-mock-extended": "^3.0.4",
"nodemon": "^3.0.1",
"prettier": "^2.8.8",
"ts-jest": "^29.1.0",
"typeorm-model-generator": "^0.4.6",
"jest-mock-extended": "^3.0.4"
"typeorm-model-generator": "^0.4.6"
},
"dependencies": {
"@jiphyeonjeon-42/contracts": "workspace:*",
Expand Down
7 changes: 0 additions & 7 deletions backend/src/server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/// <reference types="vite/client" />

import { createHttpTerminator } from 'http-terminator';
import jipDataSource from '~/app-data-source';
import { gracefulTerminationTimeout } from '~/config';
Expand Down Expand Up @@ -43,8 +41,3 @@ const attemptGracefulShutdown = async (signal: string) => {

const signals = ['SIGTERM', 'SIGINT', 'SIGUSR2'];
signals.forEach((signal) => process.on(signal, () => attemptGracefulShutdown(signal)));

if (import.meta.hot) {
import.meta.hot.on('vite:beforeFullReload', releaseResources);
import.meta.hot.dispose(releaseResources);
}
1 change: 1 addition & 0 deletions backend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ import tsconfigPaths from 'vite-tsconfig-paths';

export default defineConfig({
plugins: [tsconfigPaths()],
server: { hmr: false },
});
145 changes: 118 additions & 27 deletions pnpm-lock.yaml

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