Skip to content

Commit cc78959

Browse files
committed
wip
1 parent f8d4c9a commit cc78959

File tree

3 files changed

+41
-41
lines changed

3 files changed

+41
-41
lines changed
Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
---
2-
title: Compiling Libraries
2+
title: 라이브러리 컴파일
33
---
44

55
<Intro>
6-
This guide helps library authors understand how to use React Compiler to ship optimized library code to their users.
6+
이 가이드는 라이브러리 작성자가 React 컴파일러를 사용하여 최적화된 라이브러리 코드를 사용자에게 제공하는 방법을 설명합니다.
77
</Intro>
88

99
<InlineToc />
1010

11-
## Why Ship Compiled Code? {/*why-ship-compiled-code*/}
11+
## 컴파일된 코드를 배포해야 하는 이유 {/*why-ship-compiled-code*/}
1212

13-
As a library author, you can compile your library code before publishing to npm. This provides several benefits:
13+
라이브러리 작성자는 npm에 배포하기 전에 라이브러리 코드를 컴파일할 수 있습니다. 이는 여러 가지 이점을 제공합니다.
1414

15-
- **Performance improvements for all users** - Your library users get optimized code even if they aren't using React Compiler yet
16-
- **No configuration required by users** - The optimizations work out of the box
17-
- **Consistent behavior** - All users get the same optimized version regardless of their build setup
15+
- **모든 사용자를 위한 성능 향상** - 라이브러리 사용자가 아직 React 컴파일러를 사용하지 않더라도 최적화된 코드를 얻습니다.
16+
- **사용자에게 설정이 필요 없음** - 최적화가 바로 작동합니다.
17+
- **일관된 동작** - 모든 사용자가 빌드 설정에 관계없이 동일한 최적화된 버전을 얻습니다.
1818

19-
## Setting Up Compilation {/*setting-up-compilation*/}
19+
## 컴파일 설정하기 {/*setting-up-compilation*/}
2020

21-
Add React Compiler to your library's build process:
21+
라이브러리의 빌드 프로세스에 React 컴파일러를 추가하세요.
2222

2323
<TerminalBlock>
2424
npm install -D babel-plugin-react-compiler@latest
2525
</TerminalBlock>
2626

27-
Configure your build tool to compile your library. For example, with Babel:
27+
라이브러리를 컴파일하도록 빌드 도구를 설정하세요. Babel을 사용하는 예시입니다.
2828

2929
```js
3030
// babel.config.js
@@ -36,13 +36,13 @@ module.exports = {
3636
};
3737
```
3838

39-
## Backwards Compatibility {/*backwards-compatibility*/}
39+
## 하위 호환성 {/*backwards-compatibility*/}
4040

41-
If your library supports React versions below 19, you'll need additional configuration:
41+
라이브러리가 React 19 미만 버전을 지원하는 경우 추가 설정이 필요합니다.
4242

43-
### 1. Install the runtime package {/*install-runtime-package*/}
43+
### 1. 런타임 패키지 설치하기 {/*install-runtime-package*/}
4444

45-
We recommend installing react-compiler-runtime as a direct dependency:
45+
`react-compiler-runtime`을 직접 의존성<sup>`dependencies`</sup>으로 설치하는 것을 권장합니다.
4646

4747
<TerminalBlock>
4848
npm install react-compiler-runtime@latest
@@ -59,48 +59,48 @@ npm install react-compiler-runtime@latest
5959
}
6060
```
6161

62-
### 2. Configure the target version {/*configure-target-version*/}
62+
### 2. `target` 버전 설정하기 {/*configure-target-version*/}
6363

64-
Set the minimum React version your library supports:
64+
라이브러리가 지원하는 최소 React 버전을 설정하세요.
6565

6666
```js
6767
{
68-
target: '17', // Minimum supported React version
68+
target: '17', // 지원하는 최소 React 버전
6969
}
7070
```
7171

72-
## Testing Strategy {/*testing-strategy*/}
72+
## 테스트 전략 {/*testing-strategy*/}
7373

74-
Test your library both with and without compilation to ensure compatibility. Run your existing test suite against the compiled code, and also create a separate test configuration that bypasses the compiler. This helps catch any issues that might arise from the compilation process and ensures your library works correctly in all scenarios.
74+
호환성을 보장하기 위해 컴파일 유무에 관계없이 라이브러리를 테스트하세요. 컴파일된 코드에 대해 기존 테스트를 실행하고 컴파일러를 우회하는 별도의 테스트 설정도 만드세요. 이렇게 하면 컴파일 과정에서 발생할 수 있는 문제를 발견하고 모든 시나리오에서 라이브러리가 올바르게 작동하는지 확인할 수 있습니다.
7575

76-
## Troubleshooting {/*troubleshooting*/}
76+
## 문제 해결 {/*troubleshooting*/}
7777

78-
### Library doesn't work with older React versions {/*library-doesnt-work-with-older-react-versions*/}
78+
### 라이브러리가 이전 React 버전에서 작동하지 않는 경우 {/*library-doesnt-work-with-older-react-versions*/}
7979

80-
If your compiled library throws errors in React 17 or 18:
80+
컴파일된 라이브러리가 React 17 또는 18에서 오류를 발생시키는 경우입니다.
8181

82-
1. Verify you've installed `react-compiler-runtime` as a dependency
83-
2. Check that your `target` configuration matches your minimum supported React version
84-
3. Ensure the runtime package is included in your published bundle
82+
1. `react-compiler-runtime`이 의존성으로 설치되어 있는지 확인하세요.
83+
2. `target` 설정이 지원하는 최소 React 버전과 일치하는지 확인하세요.
84+
3. 런타임 패키지가 배포된 번들에 포함되어 있는지 확인하세요.
8585

86-
### Compilation conflicts with other Babel plugins {/*compilation-conflicts-with-other-babel-plugins*/}
86+
### 다른 Babel 플러그인과의 컴파일 충돌 {/*compilation-conflicts-with-other-babel-plugins*/}
8787

88-
Some Babel plugins may conflict with React Compiler:
88+
일부 Babel 플러그인은 React 컴파일러와 충돌할 수 있습니다.
8989

90-
1. Place `babel-plugin-react-compiler` early in your plugin list
91-
2. Disable conflicting optimizations in other plugins
92-
3. Test your build output thoroughly
90+
1. `babel-plugin-react-compiler`를 플러그인 목록의 앞쪽에 배치하세요.
91+
2. 다른 플러그인에서 충돌하는 최적화를 비활성화하세요.
92+
3. 빌드 출력을 철저히 테스트하세요.
9393

94-
### Runtime module not found {/*runtime-module-not-found*/}
94+
### 런타임 모듈을 찾을 수 없는 경우 {/*runtime-module-not-found*/}
9595

96-
If users see "Cannot find module 'react-compiler-runtime'":
96+
사용자가 "Cannot find module 'react-compiler-runtime'" 오류를 보는 경우입니다.
9797

98-
1. Ensure the runtime is listed in `dependencies`, not `devDependencies`
99-
2. Check that your bundler includes the runtime in the output
100-
3. Verify the package is published to npm with your library
98+
1. 런타임이 `devDependencies`가 아닌 `dependencies`에 나열되어 있는지 확인하세요.
99+
2. 번들러가 출력에 런타임을 포함하는지 확인하세요.
100+
3. 패키지가 라이브러리와 함께 npm에 배포되었는지 확인하세요.
101101

102-
## Next Steps {/*next-steps*/}
102+
## 다음 단계 {/*next-steps*/}
103103

104-
- Learn about [debugging techniques](/learn/react-compiler/debugging) for compiled code
105-
- Check the [configuration options](/reference/react-compiler/configuration) for all compiler options
106-
- Explore [compilation modes](/reference/react-compiler/compilationMode) for selective optimization
104+
- 컴파일된 코드를 위한 [디버깅 기법](/learn/react-compiler/debugging)에 대해 알아보세요.
105+
- 모든 컴파일러 옵션을 위한 [설정 옵션](/reference/react-compiler/configuration)을 확인하세요.
106+
- 선택적 최적화를 위한 [컴파일 모드](/reference/react-compiler/compilationMode)를 살펴보세요.

src/content/reference/react/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The React Compiler is a build-time optimization tool that automatically memoizes
3535

3636
* [Configuration](/reference/react-compiler/configuration) - Configuration options for React Compiler.
3737
* [Directives](/reference/react-compiler/directives) - Function-level directives to control compilation.
38-
* [Compiling Libraries](/reference/react-compiler/compiling-libraries) - Guide for shipping pre-compiled library code.
38+
* [라이브러리 컴파일](/reference/react-compiler/compiling-libraries) - Guide for shipping pre-compiled library code.
3939

4040
## ESLint Plugin React Hooks {/*eslint-plugin-react-hooks*/}
4141

src/sidebarReference.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@
393393
]
394394
},
395395
{
396-
"title": "Compiling Libraries",
396+
"title": "라이브러리 컴파일",
397397
"path": "/reference/react-compiler/compiling-libraries"
398398
},
399399
{

0 commit comments

Comments
 (0)