@intlayer/docs 9.3.2 → 9.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blog/ar/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/de/nextjs-multilingual-seo-comparison.md +9 -9
- package/blog/en/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/en-GB/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/es/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/fr/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/hi/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/id/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/it/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/ja/nextjs-multilingual-seo-comparison.md +9 -9
- package/blog/ko/nextjs-multilingual-seo-comparison.md +9 -9
- package/blog/pl/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/pt/nextjs-multilingual-seo-comparison.md +9 -9
- package/blog/ru/nextjs-multilingual-seo-comparison.md +9 -9
- package/blog/tr/nextjs-multilingual-seo-comparison.md +9 -9
- package/blog/uk/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/vi/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/zh/nextjs-multilingual-seo-comparison.md +10 -10
- package/docs/ar/bundle_optimization.md +1 -1
- package/docs/ar/configuration.md +32 -9
- package/docs/ar/dictionary/content_file.md +0 -22
- package/docs/ar/dictionary/function_fetching.md +23 -0
- package/docs/ar/eslint.md +9 -9
- package/docs/bn/configuration.md +34 -9
- package/docs/bn/eslint.md +9 -9
- package/docs/cs/bundle_optimization.md +1 -1
- package/docs/cs/configuration.md +33 -9
- package/docs/cs/eslint.md +9 -9
- package/docs/de/bundle_optimization.md +1 -1
- package/docs/de/configuration.md +34 -9
- package/docs/de/dictionary/content_file.md +0 -22
- package/docs/de/dictionary/function_fetching.md +23 -0
- package/docs/de/eslint.md +9 -9
- package/docs/en/bundle_optimization.md +1 -1
- package/docs/en/configuration.md +34 -9
- package/docs/en/dictionary/content_file.md +0 -22
- package/docs/en/dictionary/function_fetching.md +23 -0
- package/docs/en/eslint.md +9 -9
- package/docs/en/packages/intlayer/getLocalizedPath.md +70 -19
- package/docs/en-GB/configuration.md +33 -9
- package/docs/en-GB/dictionary/content_file.md +0 -22
- package/docs/en-GB/dictionary/function_fetching.md +23 -0
- package/docs/en-GB/eslint.md +9 -9
- package/docs/es/bundle_optimization.md +1 -1
- package/docs/es/configuration.md +35 -9
- package/docs/es/dictionary/content_file.md +0 -22
- package/docs/es/dictionary/function_fetching.md +23 -0
- package/docs/es/eslint.md +9 -9
- package/docs/fr/bundle_optimization.md +1 -1
- package/docs/fr/configuration.md +35 -9
- package/docs/fr/dictionary/content_file.md +0 -22
- package/docs/fr/dictionary/function_fetching.md +23 -0
- package/docs/fr/eslint.md +9 -9
- package/docs/hi/configuration.md +35 -9
- package/docs/hi/dictionary/content_file.md +0 -22
- package/docs/hi/dictionary/function_fetching.md +23 -0
- package/docs/hi/eslint.md +9 -9
- package/docs/id/configuration.md +35 -9
- package/docs/id/dictionary/content_file.md +0 -22
- package/docs/id/dictionary/function_fetching.md +23 -0
- package/docs/id/eslint.md +9 -9
- package/docs/it/bundle_optimization.md +1 -1
- package/docs/it/configuration.md +35 -9
- package/docs/it/dictionary/content_file.md +0 -22
- package/docs/it/dictionary/function_fetching.md +23 -0
- package/docs/it/eslint.md +9 -9
- package/docs/ja/configuration.md +30 -9
- package/docs/ja/dictionary/content_file.md +0 -22
- package/docs/ja/dictionary/function_fetching.md +23 -0
- package/docs/ja/eslint.md +9 -9
- package/docs/ko/configuration.md +31 -9
- package/docs/ko/dictionary/content_file.md +0 -22
- package/docs/ko/dictionary/function_fetching.md +23 -0
- package/docs/ko/eslint.md +9 -9
- package/docs/nl/configuration.md +33 -9
- package/docs/nl/eslint.md +9 -9
- package/docs/pl/bundle_optimization.md +1 -1
- package/docs/pl/configuration.md +34 -9
- package/docs/pl/dictionary/content_file.md +0 -22
- package/docs/pl/dictionary/function_fetching.md +23 -0
- package/docs/pl/eslint.md +9 -9
- package/docs/pt/bundle_optimization.md +1 -1
- package/docs/pt/configuration.md +34 -9
- package/docs/pt/dictionary/content_file.md +0 -22
- package/docs/pt/dictionary/function_fetching.md +23 -0
- package/docs/pt/eslint.md +9 -9
- package/docs/ru/bundle_optimization.md +1 -1
- package/docs/ru/configuration.md +34 -9
- package/docs/ru/dictionary/content_file.md +0 -22
- package/docs/ru/dictionary/function_fetching.md +23 -0
- package/docs/ru/eslint.md +9 -9
- package/docs/tr/bundle_optimization.md +1 -1
- package/docs/tr/configuration.md +33 -9
- package/docs/tr/dictionary/content_file.md +0 -22
- package/docs/tr/dictionary/function_fetching.md +23 -0
- package/docs/tr/eslint.md +9 -9
- package/docs/uk/configuration.md +35 -9
- package/docs/uk/dictionary/content_file.md +0 -22
- package/docs/uk/dictionary/function_fetching.md +23 -0
- package/docs/uk/eslint.md +9 -9
- package/docs/ur/configuration.md +35 -9
- package/docs/ur/eslint.md +9 -9
- package/docs/vi/bundle_optimization.md +1 -1
- package/docs/vi/configuration.md +33 -9
- package/docs/vi/dictionary/content_file.md +0 -22
- package/docs/vi/dictionary/function_fetching.md +23 -0
- package/docs/vi/eslint.md +9 -9
- package/docs/zh/bundle_optimization.md +1 -1
- package/docs/zh/configuration.md +29 -9
- package/docs/zh/dictionary/content_file.md +0 -22
- package/docs/zh/dictionary/function_fetching.md +23 -0
- package/docs/zh/eslint.md +9 -9
- package/docs/zh-TW/bundle_optimization.md +1 -1
- package/docs/zh-TW/eslint.md +9 -9
- package/package.json +5 -5
|
@@ -533,28 +533,6 @@ export default aboutPageMetaContent;
|
|
|
533
533
|
|
|
534
534
|
> 자세한 정보는 [변형](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dynamic_dictionaries/variants.md)을 참조하세요.
|
|
535
535
|
|
|
536
|
-
#### `meta` (`Record<string, string | number | boolean>`)
|
|
537
|
-
|
|
538
|
-
동적 레코드(Dynamic Records)와 연동하여 사용되는 이 필드는 CMS에서 관리되는 레코드나 불투명한 ID로 실행 시 가져오는 임의의 데이터를 선언할 수 있도록 합니다. 사전의 식별성은 이 `meta` 필드에 선언된 임의의 키-값 쌍 집합에 의해 정의됩니다.
|
|
539
|
-
|
|
540
|
-
**예시:**
|
|
541
|
-
|
|
542
|
-
```typescript
|
|
543
|
-
{
|
|
544
|
-
key: "product-copy",
|
|
545
|
-
meta: {
|
|
546
|
-
id: "prod_abc",
|
|
547
|
-
userId: "user_123"
|
|
548
|
-
},
|
|
549
|
-
content: {
|
|
550
|
-
name: "Widget Pro",
|
|
551
|
-
description: "The best widget."
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
```
|
|
555
|
-
|
|
556
|
-
> 자세한 정보는 [동적 레코드](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dynamic_dictionaries/dynamic_content.md)를 참조하세요.
|
|
557
|
-
|
|
558
536
|
### CMS 속성
|
|
559
537
|
|
|
560
538
|
##### `version` (string)
|
|
@@ -87,6 +87,29 @@ JSON 파일에서 콘텐츠를 가져올 수 없습니다. 대신 .ts 또는 .js
|
|
|
87
87
|
|
|
88
88
|
이 경우, `fakeFetch` 함수는 서버 응답 시간을 시뮬레이션하기 위해 지연을 모방합니다. Intlayer는 비동기 함수를 실행하고 그 결과를 `text` 키의 콘텐츠로 사용합니다.
|
|
89
89
|
|
|
90
|
+
## 원격 콘텐츠 가져오기
|
|
91
|
+
|
|
92
|
+
콘텐츠 필드에 프로미스를 직접 할당할 수도 있습니다. Intlayer는 사전을 빌드할 때 이를 기다린 후 해결된 값을 삽입합니다:
|
|
93
|
+
|
|
94
|
+
```typescript fileName="**/*.content.ts" contentDeclarationFormat={["typescript", "esm", "commonjs"]}
|
|
95
|
+
import type { Dictionary } from "intlayer";
|
|
96
|
+
|
|
97
|
+
const remoteContent = {
|
|
98
|
+
key: "remote_content",
|
|
99
|
+
content: {
|
|
100
|
+
externalContent: fetch("https://example.com").then((res) => res.json()),
|
|
101
|
+
},
|
|
102
|
+
} satisfies Dictionary;
|
|
103
|
+
|
|
104
|
+
export default remoteContent;
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```plaintext fileName="**/*.content.json" contentDeclarationFormat="json"
|
|
108
|
+
JSON 파일에서 콘텐츠를 가져올 수 없습니다. 대신 .ts 또는 .js 파일을 사용하세요.
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
> 요청은 빌드 시점에 실행되므로 가져온 데이터는 사전에 포함된 스냅샷입니다. 갱신하려면 사전을 다시 빌드하세요.
|
|
112
|
+
|
|
90
113
|
## React 컴포넌트에서 함수 기반 콘텐츠 사용하기
|
|
91
114
|
|
|
92
115
|
React 컴포넌트에서 함수 기반 콘텐츠를 사용하려면, `react-intlayer`에서 `useIntlayer`를 가져와서 콘텐츠 ID로 호출하여 콘텐츠를 가져와야 합니다. 다음은 예시입니다:
|
package/docs/ko/eslint.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2026-08-12
|
|
3
|
-
updatedAt: 2026-08-
|
|
3
|
+
updatedAt: 2026-08-13
|
|
4
4
|
title: ESLint 플러그인 | Intlayer 린트 규칙
|
|
5
5
|
description: eslint-plugin-intlayer를 사용하여 하드코딩된 문자열, Intlayer 컴파일러가 최적화할 수 없는 동적 호출, 사용되지 않는 사전 콘텐츠를 감지하세요. React, Vue, Svelte, Angular 및 Astro 전반에서 ESLint 및 oxlint와 함께 작동합니다.
|
|
6
6
|
keywords:
|
|
@@ -52,7 +52,7 @@ pnpm add --save-dev eslint-plugin-intlayer
|
|
|
52
52
|
yarn add --dev eslint-plugin-intlayer
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
ESLint 9 이상(Flat config)이 필요합니다.
|
|
55
|
+
ESLint 9 이상(Flat config)이 필요합니다. ESLint 10을 지원합니다.
|
|
56
56
|
|
|
57
57
|
## 사용법
|
|
58
58
|
|
|
@@ -61,20 +61,20 @@ ESLint 9 이상(Flat config)이 필요합니다.
|
|
|
61
61
|
<Tabs defaultTab="eslint">
|
|
62
62
|
<Tab label="ESLint" value="eslint">
|
|
63
63
|
|
|
64
|
-
```javascript fileName="eslint.config.mjs"
|
|
64
|
+
```javascript fileName="eslint.config.mjs"
|
|
65
65
|
import intlayer from "eslint-plugin-intlayer";
|
|
66
66
|
|
|
67
67
|
export default [...intlayer.configs.recommended];
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
또는
|
|
70
|
+
또는 설정을 펼친 뒤 심각도를 직접 지정할 수 있습니다:
|
|
71
71
|
|
|
72
|
-
```javascript fileName="eslint.config.mjs"
|
|
72
|
+
```javascript fileName="eslint.config.mjs"
|
|
73
73
|
import intlayer from "eslint-plugin-intlayer";
|
|
74
74
|
|
|
75
75
|
export default [
|
|
76
|
+
...intlayer.configs.recommended,
|
|
76
77
|
{
|
|
77
|
-
plugins: { intlayer },
|
|
78
78
|
rules: {
|
|
79
79
|
"intlayer/no-raw-text": "warn",
|
|
80
80
|
"intlayer/static-dictionary-key": "error",
|
|
@@ -144,7 +144,7 @@ const { title } = useIntlayer("home");
|
|
|
144
144
|
|
|
145
145
|
**옵션**
|
|
146
146
|
|
|
147
|
-
```javascript fileName="eslint.config.mjs"
|
|
147
|
+
```javascript fileName="eslint.config.mjs"
|
|
148
148
|
{
|
|
149
149
|
"intlayer/no-raw-text": [
|
|
150
150
|
"warn",
|
|
@@ -247,7 +247,7 @@ export default {
|
|
|
247
247
|
|
|
248
248
|
**옵션**
|
|
249
249
|
|
|
250
|
-
```javascript fileName="eslint.config.mjs"
|
|
250
|
+
```javascript fileName="eslint.config.mjs"
|
|
251
251
|
{
|
|
252
252
|
"intlayer/no-unused-content": [
|
|
253
253
|
"warn",
|
|
@@ -296,7 +296,7 @@ export default {
|
|
|
296
296
|
| Angular 템플릿 | `.component.html` | `@angular-eslint/template-parser` |
|
|
297
297
|
| Astro | `.astro` | `astro-eslint-parser` |
|
|
298
298
|
|
|
299
|
-
```javascript fileName="eslint.config.mjs"
|
|
299
|
+
```javascript fileName="eslint.config.mjs"
|
|
300
300
|
import intlayer from "eslint-plugin-intlayer";
|
|
301
301
|
import tseslint from "typescript-eslint";
|
|
302
302
|
import vueParser from "vue-eslint-parser";
|
package/docs/nl/configuration.md
CHANGED
|
@@ -478,6 +478,28 @@ const config: IntlayerConfig = {
|
|
|
478
478
|
*/
|
|
479
479
|
purge: true,
|
|
480
480
|
|
|
481
|
+
/**
|
|
482
|
+
* Groepeer de dictionary-chunks per taal op de code-splitting-grens die ze
|
|
483
|
+
* gebruikt, zodat een lazy geladen pagina haar inhoud in één verzoek ophaalt.
|
|
484
|
+
* Standaard: true
|
|
485
|
+
*
|
|
486
|
+
* Opmerking:
|
|
487
|
+
* - Geldt alleen voor dictionaries die `importMode: 'dynamic'` gebruiken.
|
|
488
|
+
*/
|
|
489
|
+
chunkGrouping: true,
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Laad een dictionary samen met de chunk die hem gebruikt, in plaats van hem
|
|
493
|
+
* op te halen zodra die chunk rendert. Lezers renderen synchroon in plaats van
|
|
494
|
+
* te suspenden, zodat navigeren geen laadstatus meer laat flitsen.
|
|
495
|
+
* Standaard: true
|
|
496
|
+
*
|
|
497
|
+
* Opmerking:
|
|
498
|
+
* - Alleen de opgeloste taal wordt afgewacht, dus de pagina downloadt alleen
|
|
499
|
+
* de taal die ze toont.
|
|
500
|
+
*/
|
|
501
|
+
dictionariesPreload: true,
|
|
502
|
+
|
|
481
503
|
/**
|
|
482
504
|
* Uitvoerformaat voor gegenereerde woordenboekbestanden.
|
|
483
505
|
* Standaard: ['cjs', 'esm']
|
|
@@ -1039,15 +1061,17 @@ Build-opties worden toegepast op de plug-ins `@intlayer/babel` en `@intlayer/swc
|
|
|
1039
1061
|
|
|
1040
1062
|
> Tijdens optimalisatie zal Intlayer aanroepen van woordenboeken vervangen voor optimalisatie van het splitsen van code (chunking), zodat de resulterende bundel alleen die woordenboeken importeert die daadwerkelijk worden gebruikt.
|
|
1041
1063
|
|
|
1042
|
-
| Veld
|
|
1043
|
-
|
|
|
1044
|
-
| `mode`
|
|
1045
|
-
| `optimize`
|
|
1046
|
-
| `minify`
|
|
1047
|
-
| `purge`
|
|
1048
|
-
| `checkTypes`
|
|
1049
|
-
| `
|
|
1050
|
-
| `
|
|
1064
|
+
| Veld | Beschrijving | Type | Standaard | Voorbeeld | Opmerking |
|
|
1065
|
+
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1066
|
+
| `mode` | Beheert de buildmodus. | `'auto'` | <br/> `'manual'` | `'auto'` | `'manual'` | • `'auto'`: de build wordt automatisch gestart tijdens de build van de applicatie.<br/>• `'manual'`: wordt alleen uitgevoerd bij een expliciete build-opdracht.<br/>• Kan worden gebruikt om de build van woordenboeken uit te schakelen (bijv. om uitvoering in Node.js-omgevingen te stoppen). |
|
|
1067
|
+
| `optimize` | Beheert of er build-optimalisatie moet plaatsvinden. | `boolean` | `undefined` | `process.env.NODE_ENV === 'production'` | • Indien niet gedefinieerd, wordt optimalisatie gestart bij de build van het framework (Vite/Next.js).<br/>• `true` forceert optimalisatie zelfs in dev-modus.<br/>• `false` schakelt het uit.<br/>• Indien ingeschakeld, vervangt het woordenboekaanroepen voor chunking-optimalisatie.<br/>• Vereist plug-ins `@intlayer/babel` en `@intlayer/swc`. |
|
|
1068
|
+
| `minify` | Minimaliseer de woordenboeken om de bundelgrootte te verkleinen. | `boolean` | `false` | | • Geeft aan of de bundel moet worden geminimaliseerd.<br/>• Standaard: `true` in productie.<br/>• Deze optie wordt genegeerd als `optimize` is uitgeschakeld.<br/>• Deze optie wordt genegeerd als `editor.enabled` is waar. |
|
|
1069
|
+
| `purge` | Verwijder ongebruikte sleutels in woordenboeken. | `boolean` | `false` | | • Geeft aan of de bundel moet worden opgeschoond.<br/>• Standaard: `true` in productie.<br/>• Deze optie wordt genegeerd als `optimize` is uitgeschakeld. |
|
|
1070
|
+
| `checkTypes` | Geeft aan of de build TypeScript types moet controleren en fouten moet loggen. | `boolean` | `false` | | Kan het buildproces vertragen. |
|
|
1071
|
+
| `chunkGrouping` | Geeft aan of de dictionary-chunks per taal gegroepeerd moeten worden op de code-splitting-grens die ze gebruikt. | `boolean` | `true` | | • Zonder groepering doet een pagina die uit veel componenten bestaat één verzoek per dictionary.<br/>• Dictionaries die vanuit meerdere grenzen bereikt worden, gaan naar een gedeelde chunk, zodat geen pagina de inhoud van een andere meelevert.<br/>• Geldt alleen voor dictionaries die `importMode: 'dynamic'` gebruiken.<br/>• Geldt alleen voor de client-build, en alleen bij het bundelen (niet in dev). |
|
|
1072
|
+
| `dictionariesPreload` | Geeft aan of een dictionary samen met de chunk die hem gebruikt geladen moet worden, in plaats van opgehaald te worden zodra die chunk rendert. | `boolean` | `true` | | • Het gegenereerde entry point wacht de browse-taal op topniveau af, zodat een lazy geladen route pas als geladen geldt wanneer de inhoud er is.<br/>• Lezers renderen synchroon in plaats van te suspenden, zodat navigeren geen laadstatus meer laat flitsen.<br/>• Alleen de opgeloste taal wordt afgewacht, dus de pagina downloadt alleen de taal die ze toont.<br/>• Geldt alleen voor dictionaries die `importMode: 'dynamic'` gebruiken, in de client-build.<br/>• Vereist een bundler die top-level await ondersteunt (Vite, esbuild). |
|
|
1073
|
+
| `outputFormat` | Beheert het uitvoerformaat van woordenboeken. | `('esm' | 'cjs')[]` | `['esm', 'cjs']` | `['cjs']` | |
|
|
1074
|
+
| `traversePattern` | Patronen die definieren welke bestanden tijdens de optimalisatie moeten worden gescand. | `string[]` | `['**/*.{tsx,ts,js,mjs,cjs,jsx,vue,svelte,svte}', '!**/node_modules/**', '!**/dist/**', '!**/.intlayer/**', '!**/*.config.*', '!**/*.test.*', '!**/*.spec.*', '!**/*.stories.*']` | `['src/**/*.{ts,tsx}', '../ui-library/**/*.{ts,tsx}', '!**/node_modules/**']` | • Beperk de optimalisatie tot relevante bestanden voor het verhogen van de buildprestaties.<br/>• Zou worden genegeerd als `optimize` was uitgeschakeld.<br/>• Gebruikt glob-patronen. |
|
|
1051
1075
|
|
|
1052
1076
|
---
|
|
1053
1077
|
|
package/docs/nl/eslint.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2026-08-12
|
|
3
|
-
updatedAt: 2026-08-
|
|
3
|
+
updatedAt: 2026-08-13
|
|
4
4
|
title: ESLint Plugin | Lint-regels voor Intlayer
|
|
5
5
|
description: Detecteer hardgecodeerde strings, dynamische aanroepen die de Intlayer-compiler niet kan optimaliseren en ongebruikte woordenboekinhoud met eslint-plugin-intlayer. Werkt met ESLint en oxlint op React, Vue, Svelte, Angular en Astro.
|
|
6
6
|
keywords:
|
|
@@ -52,7 +52,7 @@ pnpm add --save-dev eslint-plugin-intlayer
|
|
|
52
52
|
yarn add --dev eslint-plugin-intlayer
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Vereist ESLint 9 of nieuwer (flat config).
|
|
55
|
+
Vereist ESLint 9 of nieuwer (flat config). ESLint 10 wordt ondersteund.
|
|
56
56
|
|
|
57
57
|
## Gebruik
|
|
58
58
|
|
|
@@ -61,20 +61,20 @@ De plugin werkt in zowel ESLint als [oxlint](https://oxc.rs) — dezelfde regels
|
|
|
61
61
|
<Tabs defaultTab="eslint">
|
|
62
62
|
<Tab label="ESLint" value="eslint">
|
|
63
63
|
|
|
64
|
-
```javascript fileName="eslint.config.mjs"
|
|
64
|
+
```javascript fileName="eslint.config.mjs"
|
|
65
65
|
import intlayer from "eslint-plugin-intlayer";
|
|
66
66
|
|
|
67
67
|
export default [...intlayer.configs.recommended];
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
Of
|
|
70
|
+
Of neem een configuratie op en stel de ernstniveaus zelf in:
|
|
71
71
|
|
|
72
|
-
```javascript fileName="eslint.config.mjs"
|
|
72
|
+
```javascript fileName="eslint.config.mjs"
|
|
73
73
|
import intlayer from "eslint-plugin-intlayer";
|
|
74
74
|
|
|
75
75
|
export default [
|
|
76
|
+
...intlayer.configs.recommended,
|
|
76
77
|
{
|
|
77
|
-
plugins: { intlayer },
|
|
78
78
|
rules: {
|
|
79
79
|
"intlayer/no-raw-text": "warn",
|
|
80
80
|
"intlayer/static-dictionary-key": "error",
|
|
@@ -144,7 +144,7 @@ Om een heel bestand in één keer te herstellen, voert u `npx intlayer extract`
|
|
|
144
144
|
|
|
145
145
|
**Opties**
|
|
146
146
|
|
|
147
|
-
```javascript fileName="eslint.config.mjs"
|
|
147
|
+
```javascript fileName="eslint.config.mjs"
|
|
148
148
|
{
|
|
149
149
|
"intlayer/no-raw-text": [
|
|
150
150
|
"warn",
|
|
@@ -247,7 +247,7 @@ In tegenstelling tot de andere regels kan deze regel niet alleen oordelen op bas
|
|
|
247
247
|
|
|
248
248
|
**Opties**
|
|
249
249
|
|
|
250
|
-
```javascript fileName="eslint.config.mjs"
|
|
250
|
+
```javascript fileName="eslint.config.mjs"
|
|
251
251
|
{
|
|
252
252
|
"intlayer/no-unused-content": [
|
|
253
253
|
"warn",
|
|
@@ -296,7 +296,7 @@ Elke regel werkt in alle Intlayer-integraties, inclusief binnen Vue-, Svelte- en
|
|
|
296
296
|
| Angular-templates | `.component.html` | `@angular-eslint/template-parser` |
|
|
297
297
|
| Astro | `.astro` | `astro-eslint-parser` |
|
|
298
298
|
|
|
299
|
-
```javascript fileName="eslint.config.mjs"
|
|
299
|
+
```javascript fileName="eslint.config.mjs"
|
|
300
300
|
import intlayer from "eslint-plugin-intlayer";
|
|
301
301
|
import tseslint from "typescript-eslint";
|
|
302
302
|
import vueParser from "vue-eslint-parser";
|
|
@@ -159,7 +159,7 @@ pnpm add -D webpack-bundle-analyzer
|
|
|
159
159
|
bun add -d webpack-bundle-analyzer
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
```typescript fileName="webpack.config.ts
|
|
162
|
+
```typescript fileName="webpack.config.ts"
|
|
163
163
|
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
|
|
164
164
|
|
|
165
165
|
export default {
|
package/docs/pl/configuration.md
CHANGED
|
@@ -478,6 +478,29 @@ const config: IntlayerConfig = {
|
|
|
478
478
|
*/
|
|
479
479
|
purge: true,
|
|
480
480
|
|
|
481
|
+
/**
|
|
482
|
+
* Grupuj fragmenty słownika dla poszczególnych języków według granicy podziału
|
|
483
|
+
* kodu, która ich używa, aby leniwie ładowana strona pobierała swoją treść w
|
|
484
|
+
* jednym żądaniu.
|
|
485
|
+
* Domyślnie: true
|
|
486
|
+
*
|
|
487
|
+
* Uwaga:
|
|
488
|
+
* - Dotyczy tylko słowników używających `importMode: 'dynamic'`.
|
|
489
|
+
*/
|
|
490
|
+
chunkGrouping: true,
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Ładuj słownik razem z fragmentem, który go używa, zamiast pobierać go po
|
|
494
|
+
* wyrenderowaniu tego fragmentu. Odczyty renderują się synchronicznie zamiast
|
|
495
|
+
* zawieszać, więc nawigacja nie miga już stanem ładowania.
|
|
496
|
+
* Domyślnie: true
|
|
497
|
+
*
|
|
498
|
+
* Uwaga:
|
|
499
|
+
* - Oczekiwany jest tylko rozwiązany język, więc strona pobiera wyłącznie
|
|
500
|
+
* język, który wyświetla.
|
|
501
|
+
*/
|
|
502
|
+
dictionariesPreload: true,
|
|
503
|
+
|
|
481
504
|
/**
|
|
482
505
|
* Format wyjściowy generowanych plików słowników.
|
|
483
506
|
* Domyślnie: ['cjs', 'esm']
|
|
@@ -1054,15 +1077,17 @@ Ustawienia budowania mają zastosowanie do wtyczek `@intlayer/babel` i `@intlaye
|
|
|
1054
1077
|
|
|
1055
1078
|
> Podczas optymalizacji Intlayer zastępuje wywołania słowników optymalizacją dzielenia kodu (chunking), aby wynikowy pakiet importował tylko te słowniki, które są faktycznie używane.
|
|
1056
1079
|
|
|
1057
|
-
| Pole
|
|
1058
|
-
|
|
|
1059
|
-
| `mode`
|
|
1060
|
-
| `optimize`
|
|
1061
|
-
| `minify`
|
|
1062
|
-
| `purge`
|
|
1063
|
-
| `checkTypes`
|
|
1064
|
-
| `
|
|
1065
|
-
| `
|
|
1080
|
+
| Pole | Opis | Typ | Domyślnie | Przykład | Uwagi |
|
|
1081
|
+
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1082
|
+
| `mode` | Kontroluje tryb wykonywania budowania. | `'auto'` | <br/> `'manual'` | `'auto'` | `'manual'` | • `'auto'`: Budowanie jest automatycznie wyzwalane podczas budowania (build time) aplikacji.<br/>• `'manual'`: Uruchamiane tylko poprzez jawne polecenie budowania.<br/>• Może być użyte do zapobiegania budowaniu słowników (np. aby uniknąć uruchamiania w środowisku Node.js). |
|
|
1083
|
+
| `optimize` | Kontroluje, czy optymalizacja budowania jest wykonywana. | `boolean` | `undefined` | `process.env.NODE_ENV === 'production'` | • Jeśli niezdefiniowane, optymalizacja jest wyzwalana podczas budowania (build time) frameworka (Vite/Next.js).<br/>• `true` wymusza optymalizację nawet w trybie deweloperskim.<br/>• `false` wyłącza ją.<br/>• Jeśli włączone, zastępuje wywołania słowników optymalizacją chunking.<br/>• Wymagane wtyczki `@intlayer/babel` i `@intlayer/swc`. |
|
|
1084
|
+
| `minify` | Minimalizuj słowniki, aby zmniejszyć rozmiar bundle'a. | `boolean` | `false` | | • Określa, czy pakiet ma zostać zminimalizowany.<br/>• Domyślnie: `true` w produkcji.<br/>• Ta opcja zostanie zignorowana, jeśli `optimize` jest wyłączone.<br/>• Ta opcja zostanie zignorowana, jeśli `editor.enabled` jest prawdziwe. |
|
|
1085
|
+
| `purge` | Usuń nieużywane klucze w słownikach. | `boolean` | `false` | | • Określa, czy pakiet ma zostać wyczyszczony.<br/>• Domyślnie: `true` w produkcji.<br/>• Ta opcja zostanie zignorowana, jeśli `optimize` jest wyłączone. |
|
|
1086
|
+
| `checkTypes` | Wskazuje, czy budowanie powinno sprawdzać typy TypeScript i logować błędy. | `boolean` | `false` | | Może spowolnić proces budowania. |
|
|
1087
|
+
| `chunkGrouping` | Określa, czy fragmenty słownika dla poszczególnych języków mają być grupowane według granicy podziału kodu, która ich używa. | `boolean` | `true` | | • Bez grupowania strona złożona z wielu komponentów wysyła jedno żądanie na słownik.<br/>• Słowniki osiągane z kilku granic trafiają do wspólnego fragmentu, więc żadna strona nie dostarcza treści innej strony.<br/>• Dotyczy tylko słowników używających `importMode: 'dynamic'`.<br/>• Dotyczy tylko builda klienta i tylko podczas bundlowania (nie w trybie dev). |
|
|
1088
|
+
| `dictionariesPreload` | Określa, czy słownik ma być ładowany razem z fragmentem, który go używa, zamiast być pobierany po wyrenderowaniu tego fragmentu. | `boolean` | `true` | | • Wygenerowany punkt wejścia oczekuje na język przeglądania na najwyższym poziomie, więc leniwie ładowana trasa nie jest uznawana za załadowaną, dopóki jej treść nie jest dostępna.<br/>• Odczyty renderują się synchronicznie zamiast zawieszać, więc nawigacja nie miga już stanem ładowania.<br/>• Oczekiwany jest tylko rozwiązany język, więc strona pobiera wyłącznie język, który wyświetla.<br/>• Dotyczy tylko słowników używających `importMode: 'dynamic'`, w buildzie klienta.<br/>• Wymaga bundlera obsługującego top-level await (Vite, esbuild). |
|
|
1089
|
+
| `outputFormat` | Kontroluje format wyjściowy słowników. | `('esm' | 'cjs')[]` | `['esm', 'cjs']` | `['cjs']` | |
|
|
1090
|
+
| `traversePattern` | Wzorzec dla plików, które mają być skanowane podczas optymalizacji. | `string[]` | `['**/*.{tsx,ts,js,mjs,cjs,jsx,vue,svelte,svte}', '!**/node_modules/**', '!**/dist/**', '!**/.intlayer/**', '!**/*.config.*', '!**/*.test.*', '!**/*.spec.*', '!**/*.stories.*']` | `['src/**/*.{ts,tsx}', '../ui-library/**/*.{ts,tsx}', '!**/node_modules/**']` | • Poprawia wydajność budowania poprzez ograniczenie optymalizacji do odpowiednich plików.<br/>• Ignorowane, jeśli `optimize` jest wyłączone.<br/>• Używa wzorców glob. |
|
|
1066
1091
|
|
|
1067
1092
|
---
|
|
1068
1093
|
|
|
@@ -536,28 +536,6 @@ Używane w połączeniu z Wariantami (Variants), to pole definiuje nazwane alter
|
|
|
536
536
|
|
|
537
537
|
> Zobacz [Warianty](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/dynamic_dictionaries/variants.md) po więcej informacji.
|
|
538
538
|
|
|
539
|
-
#### `meta` (`Record<string, string | number | boolean>`)
|
|
540
|
-
|
|
541
|
-
Używane w połączeniu z Dynamicznymi Rekordami (Dynamic Records), to pole pozwala na deklarowanie rekordów zarządzanych przez CMS lub dowolnych danych pobieranych w czasie wykonywania za pomocą nieprzejrzystego identyfikatora (ID). Tożsamość słownika jest definiowana przez dowolny zestaw par klucz-wartość zadeklarowanych w tym polu `meta`.
|
|
542
|
-
|
|
543
|
-
**Przykład:**
|
|
544
|
-
|
|
545
|
-
```typescript
|
|
546
|
-
{
|
|
547
|
-
key: "product-copy",
|
|
548
|
-
meta: {
|
|
549
|
-
id: "prod_abc",
|
|
550
|
-
userId: "user_123"
|
|
551
|
-
},
|
|
552
|
-
content: {
|
|
553
|
-
name: "Widget Pro",
|
|
554
|
-
description: "The best widget."
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
```
|
|
558
|
-
|
|
559
|
-
> Zobacz [Dynamiczne Rekordy](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/dynamic_dictionaries/dynamic_content.md) po więcej informacji.
|
|
560
|
-
|
|
561
539
|
### Właściwości CMS
|
|
562
540
|
|
|
563
541
|
##### `version` (string)
|
|
@@ -89,6 +89,29 @@ Brak możliwości pobrania zawartości z pliku JSON, użyj zamiast tego pliku .t
|
|
|
89
89
|
|
|
90
90
|
W tym przypadku funkcja `fakeFetch` naśladuje opóźnienie, aby zasymulować czas odpowiedzi serwera. Intlayer wykonuje funkcję asynchroniczną i używa wyniku jako zawartości dla klucza `text`.
|
|
91
91
|
|
|
92
|
+
## Pobieranie zdalnej zawartości
|
|
93
|
+
|
|
94
|
+
Możesz również przypisać obietnicę (Promise) bezpośrednio do pola zawartości. Intlayer czeka na nią podczas budowania słowników i wstawia rozwiązaną wartość:
|
|
95
|
+
|
|
96
|
+
```typescript fileName="**/*.content.ts" contentDeclarationFormat={["typescript", "esm", "commonjs"]}
|
|
97
|
+
import type { Dictionary } from "intlayer";
|
|
98
|
+
|
|
99
|
+
const remoteContent = {
|
|
100
|
+
key: "remote_content",
|
|
101
|
+
content: {
|
|
102
|
+
externalContent: fetch("https://example.com").then((res) => res.json()),
|
|
103
|
+
},
|
|
104
|
+
} satisfies Dictionary;
|
|
105
|
+
|
|
106
|
+
export default remoteContent;
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
```plaintext fileName="**/*.content.json" contentDeclarationFormat="json"
|
|
110
|
+
Brak możliwości pobrania zawartości z pliku JSON, użyj zamiast tego pliku .ts lub .js
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
> Żądanie jest wykonywane w czasie budowania, więc pobrane dane są migawką osadzoną w słowniku. Przebuduj słowniki, aby je odświeżyć.
|
|
114
|
+
|
|
92
115
|
## Używanie zawartości opartej na funkcjach w komponentach React
|
|
93
116
|
|
|
94
117
|
Aby użyć zawartości opartej na funkcjach w komponencie React, musisz zaimportować `useIntlayer` z `react-intlayer` i wywołać ją z identyfikatorem zawartości, aby pobrać zawartość. Oto przykład:
|
package/docs/pl/eslint.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2026-08-12
|
|
3
|
-
updatedAt: 2026-08-
|
|
3
|
+
updatedAt: 2026-08-13
|
|
4
4
|
title: Wtyczka ESLint | Reguły lintera dla Intlayer
|
|
5
5
|
description: Wykrywaj zahardkodowane ciągi znaków, wywołania dynamiczne, których kompilator Intlayer nie jest w stanie zoptymalizować, oraz nieużywaną zawartość słowników dzięki eslint-plugin-intlayer. Działa z ESLint i oxlint w React, Vue, Svelte, Angular i Astro.
|
|
6
6
|
keywords:
|
|
@@ -52,7 +52,7 @@ pnpm add --save-dev eslint-plugin-intlayer
|
|
|
52
52
|
yarn add --dev eslint-plugin-intlayer
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Wymaga ESLint w wersji 9 lub nowszej (flat config).
|
|
55
|
+
Wymaga ESLint w wersji 9 lub nowszej (flat config). ESLint 10 jest wspierany.
|
|
56
56
|
|
|
57
57
|
## Użycie
|
|
58
58
|
|
|
@@ -61,20 +61,20 @@ Wtyczka działa zarówno w ESLint, jak i [oxlint](https://oxc.rs) — te same re
|
|
|
61
61
|
<Tabs defaultTab="eslint">
|
|
62
62
|
<Tab label="ESLint" value="eslint">
|
|
63
63
|
|
|
64
|
-
```javascript fileName="eslint.config.mjs"
|
|
64
|
+
```javascript fileName="eslint.config.mjs"
|
|
65
65
|
import intlayer from "eslint-plugin-intlayer";
|
|
66
66
|
|
|
67
67
|
export default [...intlayer.configs.recommended];
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
Albo rozwiń konfigurację i sam ustaw poziomy zgłoszeń:
|
|
71
71
|
|
|
72
|
-
```javascript fileName="eslint.config.mjs"
|
|
72
|
+
```javascript fileName="eslint.config.mjs"
|
|
73
73
|
import intlayer from "eslint-plugin-intlayer";
|
|
74
74
|
|
|
75
75
|
export default [
|
|
76
|
+
...intlayer.configs.recommended,
|
|
76
77
|
{
|
|
77
|
-
plugins: { intlayer },
|
|
78
78
|
rules: {
|
|
79
79
|
"intlayer/no-raw-text": "warn",
|
|
80
80
|
"intlayer/static-dictionary-key": "error",
|
|
@@ -144,7 +144,7 @@ Aby naprawić cały plik naraz, uruchom `npx intlayer extract`, a kompilator aut
|
|
|
144
144
|
|
|
145
145
|
**Opcje**
|
|
146
146
|
|
|
147
|
-
```javascript fileName="eslint.config.mjs"
|
|
147
|
+
```javascript fileName="eslint.config.mjs"
|
|
148
148
|
{
|
|
149
149
|
"intlayer/no-raw-text": [
|
|
150
150
|
"warn",
|
|
@@ -247,7 +247,7 @@ W przeciwieństwie do innych reguł, ta nie jest w stanie ocenić sytuacji wył
|
|
|
247
247
|
|
|
248
248
|
**Opcje**
|
|
249
249
|
|
|
250
|
-
```javascript fileName="eslint.config.mjs"
|
|
250
|
+
```javascript fileName="eslint.config.mjs"
|
|
251
251
|
{
|
|
252
252
|
"intlayer/no-unused-content": [
|
|
253
253
|
"warn",
|
|
@@ -296,7 +296,7 @@ Każda reguła działa we wszystkich integracjach Intlayer, w tym wewnątrz szab
|
|
|
296
296
|
| Szablony Angular | `.component.html` | `@angular-eslint/template-parser` |
|
|
297
297
|
| Astro | `.astro` | `astro-eslint-parser` |
|
|
298
298
|
|
|
299
|
-
```javascript fileName="eslint.config.mjs"
|
|
299
|
+
```javascript fileName="eslint.config.mjs"
|
|
300
300
|
import intlayer from "eslint-plugin-intlayer";
|
|
301
301
|
import tseslint from "typescript-eslint";
|
|
302
302
|
import vueParser from "vue-eslint-parser";
|
|
@@ -159,7 +159,7 @@ pnpm add -D webpack-bundle-analyzer
|
|
|
159
159
|
bun add -d webpack-bundle-analyzer
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
```typescript fileName="webpack.config.ts
|
|
162
|
+
```typescript fileName="webpack.config.ts"
|
|
163
163
|
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
|
|
164
164
|
|
|
165
165
|
export default {
|
package/docs/pt/configuration.md
CHANGED
|
@@ -478,6 +478,29 @@ const config: IntlayerConfig = {
|
|
|
478
478
|
*/
|
|
479
479
|
purge: true,
|
|
480
480
|
|
|
481
|
+
/**
|
|
482
|
+
* Agrupar os chunks de dicionário por idioma de acordo com o limite de
|
|
483
|
+
* code-splitting que os utiliza, para que uma página carregada de forma
|
|
484
|
+
* preguiçosa obtenha seu conteúdo em uma única requisição.
|
|
485
|
+
* Padrão: true
|
|
486
|
+
*
|
|
487
|
+
* Nota:
|
|
488
|
+
* - Aplica-se apenas a dicionários que usam `importMode: 'dynamic'`.
|
|
489
|
+
*/
|
|
490
|
+
chunkGrouping: true,
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Carregar um dicionário junto com o chunk que o utiliza, em vez de buscá-lo
|
|
494
|
+
* depois que esse chunk renderiza. Os leitores renderizam de forma síncrona em
|
|
495
|
+
* vez de suspender, então navegar não exibe mais um piscar de carregamento.
|
|
496
|
+
* Padrão: true
|
|
497
|
+
*
|
|
498
|
+
* Nota:
|
|
499
|
+
* - Apenas o idioma resolvido é aguardado, portanto a página baixa somente o
|
|
500
|
+
* idioma que exibe.
|
|
501
|
+
*/
|
|
502
|
+
dictionariesPreload: true,
|
|
503
|
+
|
|
481
504
|
/**
|
|
482
505
|
* Formato de saída para os ficheiros de dicionário gerados.
|
|
483
506
|
* Padrão: ['cjs', 'esm']
|
|
@@ -1057,15 +1080,17 @@ As opções de build aplicam-se aos plugins `@intlayer/babel` e `@intlayer/swc`.
|
|
|
1057
1080
|
|
|
1058
1081
|
> Durante a otimização, o Intlayer substituirá as chamadas aos dicionários para otimizar o chunking, de forma a que o bundle final importe apenas os dicionários efetivamente utilizados.
|
|
1059
1082
|
|
|
1060
|
-
| Campo
|
|
1061
|
-
|
|
|
1062
|
-
| `mode`
|
|
1063
|
-
| `optimize`
|
|
1064
|
-
| `minify`
|
|
1065
|
-
| `purge`
|
|
1066
|
-
| `checkTypes`
|
|
1067
|
-
| `
|
|
1068
|
-
| `
|
|
1083
|
+
| Campo | Descrição | Tipo | Padrão | Exemplo | Nota |
|
|
1084
|
+
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1085
|
+
| `mode` | Controla o modo de build. | `'auto'` | <br/> `'manual'` | `'auto'` | `'manual'` | • `'auto'`: build acionada automaticamente durante a build da app.<br/>• `'manual'`: executada apenas quando o comando de build é explicitamente chamado.<br/>• Pode ser usado para desativar builds de dicionários (ex: para evitar a execução em ambientes Node.js). |
|
|
1086
|
+
| `optimize` | Controla se a build deve ser otimizada. | `boolean` | `undefined` | `process.env.NODE_ENV === 'production'` | • Se não definido, a otimização é acionada na build da framework (Vite/Next.js).<br/>• `true` força a otimização mesmo no modo dev.<br/>• `false` desativa-a.<br/>• Se ativo, substitui chamadas a dicionários para otimizar o chunking.<br/>• Requer plugins `@intlayer/babel` e `@intlayer/swc`. |
|
|
1087
|
+
| `minify` | Minifica os dicionários para reduzir o tamanho do bundle. | `boolean` | `false` | | • Indica se o bundle deve ser minificado.<br/>• Padrão: `true` em produção.<br/>• Esta opção será ignorada se `optimize` estiver desativada.<br/>• Esta opção será ignorada se `editor.enabled` for true. |
|
|
1088
|
+
| `purge` | Purga as chaves não utilizadas nos dicionários. | `boolean` | `false` | | • Indica se o bundle deve ser limpo.<br/>• Padrão: `true` em produção.<br/>• Esta opção será ignorada se `optimize` estiver desativada. |
|
|
1089
|
+
| `checkTypes` | Indica se a build deve verificar os tipos TypeScript e registar erros. | `boolean` | `false` | | Pode tornar o processo de build mais lento. |
|
|
1090
|
+
| `chunkGrouping` | Indica se os chunks de dicionário por idioma devem ser agrupados de acordo com o limite de code-splitting que os utiliza. | `boolean` | `true` | | • Sem agrupamento, uma página composta por muitos componentes emite uma requisição por dicionário.<br/>• Dicionários alcançados a partir de vários limites vão para um chunk compartilhado, então nenhuma página entrega o conteúdo de outra.<br/>• Aplica-se apenas a dicionários que usam `importMode: 'dynamic'`.<br/>• Aplica-se apenas à build do cliente, e somente ao empacotar (não em desenvolvimento). |
|
|
1091
|
+
| `dictionariesPreload` | Indica se um dicionário deve ser carregado junto com o chunk que o utiliza, em vez de ser buscado depois que esse chunk renderiza. | `boolean` | `true` | | • O ponto de entrada gerado aguarda o idioma de navegação no nível superior, então uma rota carregada de forma preguiçosa não é considerada carregada até que seu conteúdo esteja disponível.<br/>• Os leitores renderizam de forma síncrona em vez de suspender, então navegar não exibe mais um piscar de carregamento.<br/>• Apenas o idioma resolvido é aguardado, portanto a página baixa somente o idioma que exibe.<br/>• Aplica-se apenas a dicionários que usam `importMode: 'dynamic'`, na build do cliente.<br/>• Requer um empacotador com suporte a top-level await (Vite, esbuild). |
|
|
1092
|
+
| `outputFormat` | Controla o formato de saída dos dicionários. | `('esm' | 'cjs')[]` | `['esm', 'cjs']` | `['cjs']` | |
|
|
1093
|
+
| `traversePattern` | Padrões que definem quais ficheiros percorrer durante a otimização. | `string[]` | `['**/*.{tsx,ts,js,mjs,cjs,jsx,vue,svelte,svte}', '!**/node_modules/**', '!**/dist/**', '!**/.intlayer/**', '!**/*.config.*', '!**/*.test.*', '!**/*.spec.*', '!**/*.stories.*']` | `['src/**/*.{ts,tsx}', '../ui-library/**/*.{ts,tsx}', '!**/node_modules/**']` | • Limite a otimização a ficheiros relevantes para melhorar o desempenho da build.<br/>• Ignorado se `optimize` estiver desativado.<br/>• Utiliza padrões glob. |
|
|
1069
1094
|
|
|
1070
1095
|
---
|
|
1071
1096
|
|