-
Notifications
You must be signed in to change notification settings - Fork 1
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 ] cloudflare deployment #24
Conversation
@@ -1,6 +1,5 @@ | |||
/** @type {import('next').NextConfig} */ | |||
const nextConfig = { | |||
output: "export", | |||
reactStrictMode: true, | |||
webpack: (config) => { | |||
config.module.rules.push({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
babel-loader
설정을 더욱 강화하면 코드 최적화에 도움이 될 수 있습니다. 예를 들어, exclude
옵션을 추가하여 node_modules
와 같은 필요 없는 디렉토리를 제외할 수 있습니다.
혹시 아직 적용하지 않았다면 런타임 확인과 ESlint 통합을 위해 'reactStrictMode'를 true
로 설정해둔 것이 좋습니다.
코드의 output
속성이 제거된 이유가 궁금합니다. 이 속성은 다음과 같이 출력 파일명을 결정하는 데 사용할 수 있는 속성입니다:
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
}
만약 이 수정이 의도적이라면 문제는 없지만 실수로 삭제되었다면 이를 확인하는 것이 중요합니다.
@@ -4,7 +4,7 @@ | |||
"private": true, | |||
"scripts": { | |||
"dev": "next dev", | |||
"build": "next build & next export", | |||
"build": "next build", | |||
"start": "next start", | |||
"lint": "next lint", | |||
"test": "jest", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 코드 패치는 next.js 프로젝트의 NPM 스크립트를 수정합니다. "next build & next export"가 "next build" 로 변경되었습니다. 이것은 다음과 같은 효과가 있습니다.
-
버그 위험: 다음 빌드 이후에
next export
명령을 실행하지 않게 되므로, 정적 HTML 출시를 기대하는 경우 오류가 발생할 수 있습니다. 따라서 이 변경이 적절한지는 프로젝트의 배포 요구 사항과 관련이 있습니다. -
개선 제안: 만약 이 패치가 의도적으로 일어난 것이라면, 그 이유를 고려하고 주석으로 명확히 나타내는 것이 좋습니다. 이는 팀원들이 변경사항을 이해하는데 도움이 됩니다. 또한,
next export
이 아직 필요한 곳이 있다면 별도의 스크립트를 추가하는 것을 고려해보세요. -
안정성: 모든 코드 변경에 대해 테스트를 실시하여 예상하지 못한 문제를 방지하는 것이 중요합니다. 때문에 테스트 및 검증 절차를 실시해 애플리케이션이 잘 작동하는지 확인해야 합니다. 이는 특히 프로덕션 레벨 코드에서 중요합니다.
지금이라도 발견해서 진짜 다행이다 ㅎㅎㅎ 고생했어 숨나! |
🔥 Related Issues
resolve #issue_number
close #issue_number
💜 작업 내용
✅ PR Point
next export
제거했습니다!😡 Trouble Shooting
👀 스크린샷 / GIF / 링크
📚 Reference