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 ] cloudflare deployment #24

Merged
merged 1 commit into from
Jun 6, 2024
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
1 change: 0 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
reactStrictMode: true,
webpack: (config) => {
config.module.rules.push({
Copy link

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'),
}

λ§Œμ•½ 이 μˆ˜μ •μ΄ μ˜λ„μ μ΄λΌλ©΄ λ¬Έμ œλŠ” μ—†μ§€λ§Œ μ‹€μˆ˜λ‘œ μ‚­μ œλ˜μ—ˆλ‹€λ©΄ 이λ₯Ό ν™•μΈν•˜λŠ” 것이 μ€‘μš”ν•©λ‹ˆλ‹€.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link

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" 둜 λ³€κ²½λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 이것은 λ‹€μŒκ³Ό 같은 νš¨κ³Όκ°€ μžˆμŠ΅λ‹ˆλ‹€.

  1. 버그 μœ„ν—˜: λ‹€μŒ λΉŒλ“œ 이후에 next export λͺ…령을 μ‹€ν–‰ν•˜μ§€ μ•Šκ²Œ λ˜λ―€λ‘œ, 정적 HTML μΆœμ‹œλ₯Ό κΈ°λŒ€ν•˜λŠ” 경우 였λ₯˜κ°€ λ°œμƒν•  수 μžˆμŠ΅λ‹ˆλ‹€. λ”°λΌμ„œ 이 변경이 μ μ ˆν•œμ§€λŠ” ν”„λ‘œμ νŠΈμ˜ 배포 μš”κ΅¬ 사항과 관련이 μžˆμŠ΅λ‹ˆλ‹€.

  2. κ°œμ„  μ œμ•ˆ: λ§Œμ•½ 이 νŒ¨μΉ˜κ°€ μ˜λ„μ μœΌλ‘œ μΌμ–΄λ‚œ 것이라면, κ·Έ 이유λ₯Ό κ³ λ €ν•˜κ³  μ£Όμ„μœΌλ‘œ λͺ…ν™•νžˆ λ‚˜νƒ€λ‚΄λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€. μ΄λŠ” νŒ€μ›λ“€μ΄ 변경사항을 μ΄ν•΄ν•˜λŠ”λ° 도움이 λ©λ‹ˆλ‹€. λ˜ν•œ, next export이 아직 ν•„μš”ν•œ 곳이 μžˆλ‹€λ©΄ λ³„λ„μ˜ 슀크립트λ₯Ό μΆ”κ°€ν•˜λŠ” 것을 κ³ λ €ν•΄λ³΄μ„Έμš”.

  3. μ•ˆμ •μ„±: λͺ¨λ“  μ½”λ“œ 변경에 λŒ€ν•΄ ν…ŒμŠ€νŠΈλ₯Ό μ‹€μ‹œν•˜μ—¬ μ˜ˆμƒν•˜μ§€ λͺ»ν•œ 문제λ₯Ό λ°©μ§€ν•˜λŠ” 것이 μ€‘μš”ν•©λ‹ˆλ‹€. λ•Œλ¬Έμ— ν…ŒμŠ€νŠΈ 및 검증 절차λ₯Ό μ‹€μ‹œν•΄ μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ΄ 잘 μž‘λ™ν•˜λŠ”μ§€ 확인해야 ν•©λ‹ˆλ‹€. μ΄λŠ” 특히 ν”„λ‘œλ•μ…˜ 레벨 μ½”λ“œμ—μ„œ μ€‘μš”ν•©λ‹ˆλ‹€.

Expand Down
Loading