Skip to content

Commit

Permalink
To fix issue #516 (#554)
Browse files Browse the repository at this point in the history
* Translate notification message

* Translate api/webpack-dev-server.mdx

* Fix issues-516
  • Loading branch information
dkstyle committed Dec 8, 2021
1 parent e742476 commit 5937c9f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/content/contribute/plugin-patterns.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MyPlugin {
});
});

// 청크에 의해 생성된 각 애셋 파일 이름을 탐색합니다.
// 청크에 의해 생성된 각 애셋 파일 이름을 탐색합니다.
chunk.files.forEach((filename) => {
// 청크에 의해 생성된 각 파일의 애셋 소스를 가져옵니다.
var source = compilation.assets[filename].source();
Expand All @@ -49,13 +49,13 @@ module.exports = MyPlugin;

W> **Deprecation warning**: 배열 함수는 계속 작동합니다.

- `module.fileDependencies`: 모듈에 포함된 소스 파일 경로의 배열입니다. 이것은 자바스크립트 파일 자체(예: index.js)와 필요한 모든 의존성 애셋 파일들(스타일 시트, 이미지 등)을 포함합니다. 의존성을 검토하는 것은 어떤 소스 파일이 모듈에 속하는지 파악하는데 유용합니다.
- `module.fileDependencies`: 모듈에 포함된 소스 파일 경로의 배열입니다. 이것은 자바스크립트 파일 자체(예: `index.js`)와 필요한 모든 의존성 애셋 파일들(스타일 시트, 이미지 등)을 포함합니다. 의존성을 검토하는 것은 어떤 소스 파일이 모듈에 속하는지 파악하는데 유용합니다.
- `compilation.chunks`: 컴파일의 청크 세트(빌드 출력)입니다. 각 청크는 최종 렌더링된 애셋의 구성을 관리합니다.

W> **Deprecation warning**: 배열 함수는 계속 작동합니다.

- `chunk.getModules()`: 청크에 포함된 모듈의 배열입니다. 각 모듈의 의존성을 통해 어떤 원시 소스 파일이 청크에 공급되는지 확인할 수 있습니다.
- `chunk.files`: 청크에 의해 생성된 출력 파일 이름의 집합입니다. `compilation.assets` 테이블에서 이러한 애셋 소스를 액세스할 수 있습니다.
- `chunk.files`: 청크에 의해 생성된 출력 파일 이름의 집합입니다. `compilation.assets` 테이블에서 이러한 애셋 소스를 액세스할 수 있습니다.

### Monitoring the watch graph

Expand Down Expand Up @@ -89,13 +89,13 @@ module.exports = MyPlugin;

파일이 변경될 때 컴파일 트리거를 수신하도록 감시 그래프에 새로운 파일 경로를 제공할 수도 있습니다. 유효한 파일 경로를 `compilation.fileDependencies` `Set` 에 더하여 감시된 파일에 추가합니다.

T> `fileDependencies` `Set` 은 각 컴파일 결과물 내에서 다시 빌드되므로, 플러그인은 감시를 유지하기 위해 각 컴파일 결과물 자체에 감시된 의존성을 추가해야 합니다.
T> `fileDependencies` `Set` 은 각 컴파일 결과물 내에서 다시 빌드되므로, 플러그인은 감시를 유지하기 위해 각 컴파일 결과물 자체에 감시된 의존성을 추가해야 합니다.

W> wepback 5부터, `compilation.fileDependencies` , `compilation.contextDependencies` 그리고 `compilation.missingDependencies` 는 이제 더 이상 `Sortable Set` 이 아니라 `Set` 이므로 정렬되지 않습니다.
W> wepback 5부터, `compilation.fileDependencies` , `compilation.contextDependencies` 그리고 `compilation.missingDependencies` 는 이제 더 이상 `Sortable Set` 이 아니라 `Set` 이므로 정렬되지 않습니다.

## Changed chunks

감시 그래프와 유사하게, 해시를 추적하여 컴파일 결과물 내에서 변경된 청크(또는 모듈)를 모니터링할 수 있습니다.
감시 그래프와 유사하게, 해시를 추적하여 컴파일 결과물 내에서 변경된 청크(또는 모듈)를 모니터링할 수 있습니다.

```javascript
class MyPlugin {
Expand Down

0 comments on commit 5937c9f

Please sign in to comment.