@intlayer/docs 8.1.1 → 8.1.5

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.
Files changed (251) hide show
  1. package/blog/ar/vue-i18n_vs_intlayer.md +1 -1
  2. package/blog/de/per-component_vs_centralized_i18n.md +1 -1
  3. package/blog/de/vue-i18n_vs_intlayer.md +1 -1
  4. package/blog/en/__per-component_vs_centralized_i18n.md +1 -1
  5. package/blog/en/per-component_vs_centralized_i18n.md +1 -1
  6. package/blog/en/vue-i18n_vs_intlayer.md +1 -1
  7. package/blog/en-GB/per-component_vs_centralized_i18n.md +1 -1
  8. package/blog/en-GB/vue-i18n_vs_intlayer.md +1 -1
  9. package/blog/es/per-component_vs_centralized_i18n.md +1 -1
  10. package/blog/es/vue-i18n_vs_intlayer.md +1 -1
  11. package/blog/fr/per-component_vs_centralized_i18n.md +1 -1
  12. package/blog/fr/vue-i18n_vs_intlayer.md +1 -1
  13. package/blog/hi/vue-i18n_vs_intlayer.md +1 -1
  14. package/blog/id/vue-i18n_vs_intlayer.md +1 -1
  15. package/blog/it/vue-i18n_vs_intlayer.md +1 -1
  16. package/blog/ja/vue-i18n_vs_intlayer.md +1 -1
  17. package/blog/ko/vue-i18n_vs_intlayer.md +1 -1
  18. package/blog/pl/vue-i18n_vs_intlayer.md +1 -1
  19. package/blog/pt/per-component_vs_centralized_i18n.md +1 -1
  20. package/blog/pt/vue-i18n_vs_intlayer.md +1 -1
  21. package/blog/ru/vue-i18n_vs_intlayer.md +1 -1
  22. package/blog/tr/vue-i18n_vs_intlayer.md +1 -1
  23. package/blog/uk/vue-i18n_vs_intlayer.md +1 -1
  24. package/blog/vi/vue-i18n_vs_intlayer.md +1 -1
  25. package/blog/zh/vue-i18n_vs_intlayer.md +1 -1
  26. package/dist/cjs/blog.cjs +1 -21
  27. package/dist/cjs/blog.cjs.map +1 -1
  28. package/dist/cjs/common.cjs +1 -77
  29. package/dist/cjs/common.cjs.map +1 -1
  30. package/dist/cjs/doc.cjs +1 -21
  31. package/dist/cjs/doc.cjs.map +1 -1
  32. package/dist/cjs/frequentQuestions.cjs +1 -21
  33. package/dist/cjs/frequentQuestions.cjs.map +1 -1
  34. package/dist/cjs/generated/blog.entry.cjs +1 -551
  35. package/dist/cjs/generated/blog.entry.cjs.map +1 -1
  36. package/dist/cjs/generated/docs.entry.cjs +1 -3071
  37. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  38. package/dist/cjs/generated/frequentQuestions.entry.cjs +1 -351
  39. package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
  40. package/dist/cjs/generated/legal.entry.cjs +1 -71
  41. package/dist/cjs/generated/legal.entry.cjs.map +1 -1
  42. package/dist/cjs/index.cjs +1 -34
  43. package/dist/cjs/legal.cjs +1 -21
  44. package/dist/cjs/legal.cjs.map +1 -1
  45. package/dist/esm/blog.mjs +1 -14
  46. package/dist/esm/blog.mjs.map +1 -1
  47. package/dist/esm/common.mjs +1 -66
  48. package/dist/esm/common.mjs.map +1 -1
  49. package/dist/esm/doc.mjs +1 -14
  50. package/dist/esm/doc.mjs.map +1 -1
  51. package/dist/esm/frequentQuestions.mjs +1 -14
  52. package/dist/esm/frequentQuestions.mjs.map +1 -1
  53. package/dist/esm/generated/blog.entry.mjs +1 -550
  54. package/dist/esm/generated/blog.entry.mjs.map +1 -1
  55. package/dist/esm/generated/docs.entry.mjs +1 -3070
  56. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  57. package/dist/esm/generated/frequentQuestions.entry.mjs +1 -350
  58. package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
  59. package/dist/esm/generated/legal.entry.mjs +1 -70
  60. package/dist/esm/generated/legal.entry.mjs.map +1 -1
  61. package/dist/esm/index.mjs +1 -6
  62. package/dist/esm/legal.mjs +1 -14
  63. package/dist/esm/legal.mjs.map +1 -1
  64. package/dist/types/common.d.ts.map +1 -1
  65. package/dist/types/generated/docs.entry.d.ts +0 -5
  66. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  67. package/docs/ar/agent_skills.md +7 -1
  68. package/docs/ar/cli/build.md +8 -0
  69. package/docs/ar/cli/index.md +1 -1
  70. package/docs/ar/compiler.md +1 -1
  71. package/docs/ar/configuration.md +34 -17
  72. package/docs/de/agent_skills.md +7 -1
  73. package/docs/de/cli/build.md +8 -0
  74. package/docs/de/cli/index.md +1 -1
  75. package/docs/de/compiler.md +1 -1
  76. package/docs/de/configuration.md +34 -17
  77. package/docs/en/agent_skills.md +7 -1
  78. package/docs/en/cli/build.md +8 -0
  79. package/docs/en/compiler.md +1 -1
  80. package/docs/en/configuration.md +79 -11
  81. package/docs/en-GB/agent_skills.md +7 -1
  82. package/docs/en-GB/cli/build.md +8 -0
  83. package/docs/en-GB/cli/index.md +1 -1
  84. package/docs/en-GB/compiler.md +1 -1
  85. package/docs/en-GB/configuration.md +34 -17
  86. package/docs/es/agent_skills.md +7 -1
  87. package/docs/es/cli/build.md +8 -0
  88. package/docs/es/cli/index.md +1 -1
  89. package/docs/es/compiler.md +1 -1
  90. package/docs/es/configuration.md +34 -17
  91. package/docs/fr/agent_skills.md +7 -1
  92. package/docs/fr/cli/build.md +8 -0
  93. package/docs/fr/cli/index.md +1 -1
  94. package/docs/fr/compiler.md +1 -1
  95. package/docs/fr/configuration.md +34 -17
  96. package/docs/hi/agent_skills.md +7 -1
  97. package/docs/hi/cli/build.md +8 -0
  98. package/docs/hi/cli/index.md +1 -1
  99. package/docs/hi/compiler.md +1 -1
  100. package/docs/hi/configuration.md +34 -17
  101. package/docs/id/agent_skills.md +7 -1
  102. package/docs/id/cli/build.md +8 -0
  103. package/docs/id/cli/index.md +1 -1
  104. package/docs/id/compiler.md +1 -1
  105. package/docs/id/configuration.md +34 -17
  106. package/docs/it/agent_skills.md +7 -1
  107. package/docs/it/cli/build.md +8 -0
  108. package/docs/it/cli/index.md +1 -1
  109. package/docs/it/compiler.md +1 -1
  110. package/docs/it/configuration.md +34 -17
  111. package/docs/ja/agent_skills.md +7 -1
  112. package/docs/ja/cli/build.md +8 -0
  113. package/docs/ja/cli/index.md +1 -1
  114. package/docs/ja/compiler.md +1 -1
  115. package/docs/ja/configuration.md +34 -17
  116. package/docs/ko/agent_skills.md +7 -1
  117. package/docs/ko/cli/build.md +8 -0
  118. package/docs/ko/cli/index.md +1 -1
  119. package/docs/ko/compiler.md +1 -1
  120. package/docs/ko/configuration.md +34 -17
  121. package/docs/pl/agent_skills.md +7 -1
  122. package/docs/pl/cli/build.md +8 -0
  123. package/docs/pl/cli/index.md +1 -1
  124. package/docs/pl/compiler.md +1 -1
  125. package/docs/pl/configuration.md +34 -17
  126. package/docs/pt/agent_skills.md +7 -1
  127. package/docs/pt/cli/build.md +8 -0
  128. package/docs/pt/cli/index.md +1 -1
  129. package/docs/pt/compiler.md +1 -1
  130. package/docs/pt/configuration.md +34 -17
  131. package/docs/ru/agent_skills.md +7 -1
  132. package/docs/ru/cli/build.md +8 -0
  133. package/docs/ru/cli/index.md +1 -1
  134. package/docs/ru/compiler.md +1 -1
  135. package/docs/ru/configuration.md +34 -17
  136. package/docs/tr/agent_skills.md +7 -1
  137. package/docs/tr/cli/build.md +8 -0
  138. package/docs/tr/cli/index.md +1 -1
  139. package/docs/tr/compiler.md +1 -1
  140. package/docs/tr/configuration.md +34 -17
  141. package/docs/uk/agent_skills.md +7 -1
  142. package/docs/uk/cli/build.md +8 -0
  143. package/docs/uk/cli/index.md +1 -1
  144. package/docs/uk/compiler.md +1 -1
  145. package/docs/uk/configuration.md +52 -6
  146. package/docs/vi/agent_skills.md +7 -1
  147. package/docs/vi/cli/build.md +8 -0
  148. package/docs/vi/cli/index.md +1 -1
  149. package/docs/vi/compiler.md +1 -1
  150. package/docs/vi/configuration.md +34 -17
  151. package/docs/zh/agent_skills.md +7 -1
  152. package/docs/zh/cli/build.md +8 -0
  153. package/docs/zh/cli/index.md +1 -1
  154. package/docs/zh/compiler.md +1 -1
  155. package/docs/zh/configuration.md +34 -17
  156. package/package.json +11 -12
  157. package/src/common.ts +2 -1
  158. package/src/generated/blog.entry.ts +1 -1
  159. package/src/generated/docs.entry.ts +1 -101
  160. package/src/generated/frequentQuestions.entry.ts +1 -1
  161. package/src/generated/legal.entry.ts +1 -1
  162. package/docs/ar/packages/angular-intlayer.md +0 -50
  163. package/docs/ar/packages/astro-intlayer.md +0 -40
  164. package/docs/ar/packages/intlayer-cli.md +0 -46
  165. package/docs/ar/packages/next-intlayer.md +0 -70
  166. package/docs/ar/packages/vue-intlayer.md +0 -59
  167. package/docs/de/packages/angular-intlayer.md +0 -50
  168. package/docs/de/packages/astro-intlayer.md +0 -37
  169. package/docs/de/packages/intlayer-cli.md +0 -46
  170. package/docs/de/packages/next-intlayer.md +0 -70
  171. package/docs/de/packages/vue-intlayer.md +0 -59
  172. package/docs/en/packages/angular-intlayer.md +0 -50
  173. package/docs/en/packages/astro-intlayer.md +0 -37
  174. package/docs/en/packages/intlayer-cli.md +0 -46
  175. package/docs/en/packages/next-intlayer.md +0 -70
  176. package/docs/en/packages/vue-intlayer.md +0 -59
  177. package/docs/en-GB/packages/angular-intlayer.md +0 -50
  178. package/docs/en-GB/packages/astro-intlayer.md +0 -37
  179. package/docs/en-GB/packages/intlayer-cli.md +0 -46
  180. package/docs/en-GB/packages/next-intlayer.md +0 -70
  181. package/docs/en-GB/packages/vue-intlayer.md +0 -59
  182. package/docs/es/packages/angular-intlayer.md +0 -50
  183. package/docs/es/packages/astro-intlayer.md +0 -37
  184. package/docs/es/packages/intlayer-cli.md +0 -46
  185. package/docs/es/packages/next-intlayer.md +0 -70
  186. package/docs/es/packages/vue-intlayer.md +0 -59
  187. package/docs/fr/packages/angular-intlayer.md +0 -50
  188. package/docs/fr/packages/astro-intlayer.md +0 -37
  189. package/docs/fr/packages/intlayer-cli.md +0 -46
  190. package/docs/fr/packages/next-intlayer.md +0 -70
  191. package/docs/fr/packages/vue-intlayer.md +0 -59
  192. package/docs/hi/packages/angular-intlayer.md +0 -50
  193. package/docs/hi/packages/astro-intlayer.md +0 -37
  194. package/docs/hi/packages/intlayer-cli.md +0 -46
  195. package/docs/hi/packages/next-intlayer.md +0 -70
  196. package/docs/hi/packages/vue-intlayer.md +0 -60
  197. package/docs/id/packages/angular-intlayer.md +0 -50
  198. package/docs/id/packages/astro-intlayer.md +0 -37
  199. package/docs/id/packages/intlayer-cli.md +0 -46
  200. package/docs/id/packages/next-intlayer.md +0 -70
  201. package/docs/id/packages/vue-intlayer.md +0 -59
  202. package/docs/it/packages/angular-intlayer.md +0 -50
  203. package/docs/it/packages/astro-intlayer.md +0 -37
  204. package/docs/it/packages/intlayer-cli.md +0 -46
  205. package/docs/it/packages/next-intlayer.md +0 -70
  206. package/docs/it/packages/vue-intlayer.md +0 -59
  207. package/docs/ja/packages/angular-intlayer.md +0 -50
  208. package/docs/ja/packages/astro-intlayer.md +0 -37
  209. package/docs/ja/packages/intlayer-cli.md +0 -46
  210. package/docs/ja/packages/next-intlayer.md +0 -70
  211. package/docs/ja/packages/vue-intlayer.md +0 -59
  212. package/docs/ko/packages/angular-intlayer.md +0 -50
  213. package/docs/ko/packages/astro-intlayer.md +0 -37
  214. package/docs/ko/packages/intlayer-cli.md +0 -46
  215. package/docs/ko/packages/next-intlayer.md +0 -70
  216. package/docs/ko/packages/vue-intlayer.md +0 -59
  217. package/docs/pl/packages/angular-intlayer.md +0 -50
  218. package/docs/pl/packages/astro-intlayer.md +0 -37
  219. package/docs/pl/packages/intlayer-cli.md +0 -46
  220. package/docs/pl/packages/next-intlayer.md +0 -70
  221. package/docs/pl/packages/vue-intlayer.md +0 -59
  222. package/docs/pt/packages/angular-intlayer.md +0 -50
  223. package/docs/pt/packages/astro-intlayer.md +0 -37
  224. package/docs/pt/packages/intlayer-cli.md +0 -46
  225. package/docs/pt/packages/next-intlayer.md +0 -70
  226. package/docs/pt/packages/vue-intlayer.md +0 -59
  227. package/docs/ru/packages/angular-intlayer.md +0 -50
  228. package/docs/ru/packages/astro-intlayer.md +0 -37
  229. package/docs/ru/packages/intlayer-cli.md +0 -46
  230. package/docs/ru/packages/next-intlayer.md +0 -70
  231. package/docs/ru/packages/vue-intlayer.md +0 -59
  232. package/docs/tr/packages/angular-intlayer.md +0 -50
  233. package/docs/tr/packages/astro-intlayer.md +0 -37
  234. package/docs/tr/packages/intlayer-cli.md +0 -46
  235. package/docs/tr/packages/next-intlayer.md +0 -70
  236. package/docs/tr/packages/vue-intlayer.md +0 -59
  237. package/docs/uk/packages/angular-intlayer.md +0 -50
  238. package/docs/uk/packages/astro-intlayer.md +0 -37
  239. package/docs/uk/packages/intlayer-cli.md +0 -46
  240. package/docs/uk/packages/next-intlayer.md +0 -70
  241. package/docs/uk/packages/vue-intlayer.md +0 -59
  242. package/docs/vi/packages/angular-intlayer.md +0 -50
  243. package/docs/vi/packages/astro-intlayer.md +0 -37
  244. package/docs/vi/packages/intlayer-cli.md +0 -46
  245. package/docs/vi/packages/next-intlayer.md +0 -70
  246. package/docs/vi/packages/vue-intlayer.md +0 -59
  247. package/docs/zh/packages/angular-intlayer.md +0 -50
  248. package/docs/zh/packages/astro-intlayer.md +0 -37
  249. package/docs/zh/packages/intlayer-cli.md +0 -46
  250. package/docs/zh/packages/next-intlayer.md +0 -70
  251. package/docs/zh/packages/vue-intlayer.md +0 -59
@@ -14,6 +14,9 @@ slugs:
14
14
  - concept
15
15
  - configuration
16
16
  history:
17
+ - version: 8.1.5
18
+ date: 2026-02-23
19
+ changes: Add compiler option 'build-only', and dictionary prefix
17
20
  - version: 8.0.6
18
21
  date: 2026-02-12
19
22
  changes: Add support for Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face, and Together.ai providers
@@ -109,6 +112,7 @@ Intlayer accepts JSON, JS, MJS, and TS configuration file formats:
109
112
 
110
113
  ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
111
114
  import { Locales, type IntlayerConfig } from "intlayer";
115
+ import { nextjsRewrite } from "intlayer/routing";
112
116
  import { z } from "zod";
113
117
 
114
118
  /**
@@ -215,12 +219,12 @@ const config: IntlayerConfig = {
215
219
  /**
216
220
  * Custom URL rewriting rules for locale-specific paths.
217
221
  */
218
- rewrite: {
219
- "/about": {
220
- en: "/about",
221
- fr: "/a-propos",
222
+ rewrite: nextjsRewrite({
223
+ "/[locale]/about": {
224
+ en: "/[locale]/about",
225
+ fr: "/[locale]/a-propos",
222
226
  },
223
- },
227
+ }),
224
228
  },
225
229
 
226
230
  /**
@@ -377,6 +381,12 @@ const config: IntlayerConfig = {
377
381
  * Default: ['esm', 'cjs']
378
382
  */
379
383
  outputFormat: ["esm"],
384
+
385
+ /**
386
+ * Indicates if the build should check TypeScript types.
387
+ * Default: false
388
+ */
389
+ checkTypes: false,
380
390
  },
381
391
 
382
392
  /**
@@ -445,13 +455,17 @@ const config: IntlayerConfig = {
445
455
  compiler: {
446
456
  /**
447
457
  * Indicates if the compiler should be enabled.
458
+ * Set to 'build-only' to skip the compiler during development and speed up start times.
448
459
  */
449
460
  enabled: true,
450
461
 
451
462
  /**
452
463
  * Pattern to traverse the code to optimize.
453
464
  */
454
- transformPattern: ["**/*.{js,ts,mjs,cjs,jsx,tsx}", "!**/node_modules/**"],
465
+ transformPattern: [
466
+ "**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
467
+ "!**/node_modules/**",
468
+ ],
455
469
 
456
470
  /**
457
471
  * Pattern to exclude from the optimization.
@@ -461,7 +475,12 @@ const config: IntlayerConfig = {
461
475
  /**
462
476
  * Output directory for the optimized dictionaries.
463
477
  */
464
- outputDir: "compiler",
478
+ outputDir: "i18n",
479
+
480
+ /**
481
+ * Dictionary key prefix
482
+ */
483
+ dictionaryKeyPrefix: "", // Remove base prefix
465
484
  },
466
485
 
467
486
  /**
@@ -682,7 +701,7 @@ Settings that control routing behavior, including URL structure, locale storage,
682
701
  ```typescript
683
702
  routing: {
684
703
  mode: "prefix-no-default", // Fallback strategy
685
- rewrite: {
704
+ rewrite: nextjsRewrite({
686
705
  "/about": {
687
706
  en: "/about",
688
707
  fr: "/a-propos",
@@ -695,13 +714,14 @@ Settings that control routing behavior, including URL structure, locale storage,
695
714
  en: "/blog/[category]/[id]",
696
715
  fr: "/journal/[category]/[id]",
697
716
  },
698
- },
717
+ }),
699
718
  }
700
719
  ```
701
720
  - _Note_: The rewrite rules take precedence over the default `mode` behavior. If a path matches a rewrite rule, the localized path from the rewrite configuration will be used instead of the standard locale prefixing.
702
721
  - _Note_: Dynamic route parameters are supported using bracket notation (e.g., `[slug]`, `[id]`). The parameter values are automatically extracted from the URL and interpolated into the rewritten path.
703
722
  - _Note_: Works with both Next.js and Vite applications. The middleware/proxy will automatically rewrite incoming requests to match the internal route structure.
704
723
  - _Note_: When generating URLs with `getLocalizedUrl()`, the rewrite rules are automatically applied if they match the provided path.
724
+ - _Reference_: For more information, see [Custom URL Rewrites](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/custom_url_rewrites.md).
705
725
 
706
726
  #### Cookie Attributes
707
727
 
@@ -817,6 +837,8 @@ export default defineConfig({
817
837
 
818
838
  ```typescript
819
839
  // intlayer.config.ts
840
+ import { nextjsRewrite } from "intlayer/routing";
841
+
820
842
  export default defineConfig({
821
843
  internationalization: {
822
844
  locales: ["en", "fr"],
@@ -825,7 +847,7 @@ export default defineConfig({
825
847
  routing: {
826
848
  mode: "prefix-no-default", // Fallback for non-rewritten paths
827
849
  storage: "cookie",
828
- rewrite: {
850
+ rewrite: nextjsRewrite({
829
851
  "/about": {
830
852
  en: "/about",
831
853
  fr: "/a-propos",
@@ -838,7 +860,7 @@ export default defineConfig({
838
860
  en: "/blog/[category]/[id]",
839
861
  fr: "/journal/[category]/[id]",
840
862
  },
841
- },
863
+ }),
842
864
  },
843
865
  });
844
866
  ```
@@ -1148,6 +1170,12 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
1148
1170
  - _Note_: Fetch mode will use the live sync API to fetch the dictionaries. If the API call fails, the dictionaries will be imported dynamically as "dynamic" mode.
1149
1171
  - _Note_: This option will not impact the `getIntlayer`, `getDictionary`, `useDictionary`, `useDictionaryAsync` and `useDictionaryDynamic` functions.
1150
1172
  - _Note_: **Deprecated**: Use `dictionary.importMode` instead.
1173
+ - **checkTypes**:
1174
+ - _Type_: `boolean`
1175
+ - _Default_: `false`
1176
+ - _Description_: Indicates if the build should check TypeScript types and log errors.
1177
+ - _Note_: This can slow down the build.
1178
+
1151
1179
  - **outputFormat**:
1152
1180
  - _Type_: `'esm' | 'cjs'`
1153
1181
  - _Default_: `'esm'`
@@ -1163,3 +1191,43 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
1163
1191
  - _Note_: Use this to limit optimization to relevant code files and improve build performance.
1164
1192
  - _Note_: This option will be ignored if `optimize` is disabled.
1165
1193
  - _Note_: Use glob pattern.
1194
+
1195
+ ---
1196
+
1197
+ ### Compiler Configuration
1198
+
1199
+ Settings that control the Intlayer compiler, which extracts dictionaries straight from your components.
1200
+
1201
+ #### Properties
1202
+
1203
+ - **enabled**:
1204
+ - _Type_: `boolean | 'build-only'`
1205
+ - _Default_: `true`
1206
+ - _Description_: Indicates if the compiler should be enabled to extract the dictionaries.
1207
+ - _Example_: `'build-only'`
1208
+ - _Note_: Setting it to `'build-only'` will skip the compiler during development mode to speed up build times. It will only run on build commands.
1209
+
1210
+ - **dictionaryKeyPrefix**:
1211
+ - _Type_: `string`
1212
+ - _Default_: `'comp-'`
1213
+ - _Description_: Prefix for the extracted dictionary keys.
1214
+ - _Example_: `'my-key-'`
1215
+ - _Note_: When dictionaries are extracted, the key is generated based on the file name. This prefix is added to the generated key to prevent conflicts.
1216
+
1217
+ - **transformPattern**:
1218
+ - _Type_: `string | string[]`
1219
+ - _Default_: `['**/*.{ts,tsx,jsx,js,cjs,mjs,svelte,vue}', '!**/node_modules/**']`
1220
+ - _Description_: Patterns that define which files should be traversed during optimization.
1221
+ - _Example_: `['src/**/*.{ts,tsx}', '!**/node_modules/**']`
1222
+ - _Note_: Use this to limit optimization to relevant code files and improve build performance.
1223
+
1224
+ - **excludePattern**:
1225
+ - _Type_: `string | string[]`
1226
+ - _Default_: `['**/node_modules/**']`
1227
+ - _Description_: Patterns that define which files should be excluded during optimization.
1228
+ - _Example_: `['**/node_modules/**', '!**/node_modules/react/**']`
1229
+
1230
+ - **outputDir**:
1231
+ - _Type_: `string`
1232
+ - _Default_: `'compiler'`
1233
+ - _Description_: The directory where the extracted dictionaries will be stored, relative to your project base path.
@@ -26,11 +26,17 @@ The `intlayer init skills` command is the simplest way to set up agent skills in
26
26
  npx intlayer init skills
27
27
  ```
28
28
 
29
+ Or using Vercel Skill SDK
30
+
31
+ ```bash
32
+ npx skills add aymericzip/intlayer-skills
33
+ ```
34
+
29
35
  When you run this command, it will:
30
36
 
31
37
  1. Detect the framework you are using (e.g., Next.js, React, Vite).
32
38
  2. Ask which platforms you want to install skills for (Cursor, Windsurf, VS Code, OpenCode, Claude Code, GitHub Copilot Workspace, etc.).
33
- 3. Generate the required configuration files (e.g., `.cursor/skills/intlayer_next_js/SKILL.md`, `.windsurf/skills/intlayer_next_js/SKILL.md`, `.opencode/skills/intlayer_next_js/SKILL.md`, `.vscode/mcp.json`, etc.).
39
+ 3. Generate the required configuration files (e.g., `.cursor/skills/intlayer-next-js/SKILL.md`, `.windsurf/skills/intlayer-next-js/SKILL.md`, `.opencode/skills/intlayer-next-js/SKILL.md`, `.vscode/mcp.json`, etc.).
34
40
 
35
41
  ## Supported Platforms
36
42
 
@@ -13,6 +13,10 @@ slugs:
13
13
  - concept
14
14
  - cli
15
15
  - build
16
+ history:
17
+ - version: 8.1.5
18
+ date: 2026-02-23
19
+ changes: Add checkTypes option
16
20
  ---
17
21
 
18
22
  # Build Dictionaries
@@ -62,3 +66,7 @@ This command will find your declaration content files by default at `./src/**/*.
62
66
  - **`--no-cache`**: Disable the cache.
63
67
 
64
68
  > Example: `npx intlayer build --no-cache`
69
+
70
+ - **`--check-types`**: Check types of the content declaration files.
71
+
72
+ > Example: `npx intlayer build --check-types`
@@ -134,7 +134,7 @@ To see how to configure available locales, or other parameters, refer to the [co
134
134
 
135
135
  ### Component Management
136
136
 
137
- - **[Transform Components](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/transform.md)** - Transform existing components to use Intlayer
137
+ - **[Transform Components](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/extract.md)** - Transform existing components to use Intlayer
138
138
 
139
139
  ### Configuration
140
140
 
@@ -49,7 +49,7 @@ Whilst the compiler offers an excellent "just works" experience, it also introdu
49
49
 
50
50
  For a deeper architectural comparison, see the blog post [Compiler vs. Declarative i18n](https://github.com/aymericzip/intlayer/blob/main/docs/blog/en/compiler_vs_declarative_i18n.md).
51
51
 
52
- As an alternative, to automate your i18n process whilst keeping full control of your content, Intlayer also provides an auto-extraction command `intlayer transform` (see [CLI documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/transform.md)), or the `Intlayer: extract content to Dictionary` command from the Intlayer VS Code extension (see [VS Code extension documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/vs_code_extension.md)).
52
+ As an alternative, to automate your i18n process whilst keeping full control of your content, Intlayer also provides an auto-extraction command `intlayer extract` (see [CLI documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/extract.md)), or the `Intlayer: extract content to Dictionary` command from the Intlayer VS Code extension (see [VS Code extension documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/vs_code_extension.md)).
53
53
 
54
54
  ## Usage
55
55
 
@@ -85,6 +85,7 @@ Intlayer accepts JSON, JS, MJS, and TS configuration file formats:
85
85
 
86
86
  ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
87
87
  import { Locales, type IntlayerConfig } from "intlayer";
88
+ import { nextjsRewrite } from "intlayer/routing";
88
89
  import { z } from "zod";
89
90
 
90
91
  /**
@@ -191,12 +192,12 @@ const config: IntlayerConfig = {
191
192
  /**
192
193
  * Custom URL rewriting rules for locale-specific paths.
193
194
  */
194
- rewrite: {
195
- "/about": {
196
- en: "/about",
197
- fr: "/a-propos",
195
+ rewrite: nextjsRewrite({
196
+ "/[locale]/about": {
197
+ en: "/[locale]/about",
198
+ fr: "/[locale]/a-propos",
198
199
  },
199
- },
200
+ }),
200
201
  },
201
202
 
202
203
  /**
@@ -342,6 +343,12 @@ const config: IntlayerConfig = {
342
343
  * Default: ['esm', 'cjs']
343
344
  */
344
345
  outputFormat: ["esm"],
346
+
347
+ /**
348
+ * Indicates if the build should check TypeScript types.
349
+ * Default: false
350
+ */
351
+ checkTypes: false,
345
352
  },
346
353
 
347
354
  /**
@@ -416,7 +423,10 @@ const config: IntlayerConfig = {
416
423
  /**
417
424
  * Pattern to traverse the code to optimize.
418
425
  */
419
- transformPattern: ["**/*.{js,ts,mjs,cjs,jsx,tsx}", "!**/node_modules/**"],
426
+ transformPattern: [
427
+ "**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
428
+ "!**/node_modules/**",
429
+ ],
420
430
 
421
431
  /**
422
432
  * Pattern to exclude from the optimization.
@@ -629,26 +639,27 @@ Settings that control middleware behaviour, including how the application handle
629
639
  ```typescript
630
640
  routing: {
631
641
  mode: "prefix-no-default", // Fallback strategy
632
- rewrite: {
633
- "/about": {
634
- en: "/about",
635
- fr: "/a-propos",
642
+ rewrite: nextjsRewrite({
643
+ "/[locale]/about": {
644
+ en: "/[locale]/about",
645
+ fr: "/[locale]/a-propos",
636
646
  },
637
- "/product/[slug]": {
638
- en: "/product/[slug]",
639
- fr: "/produit/[slug]",
647
+ "/[locale]/product/[slug]": {
648
+ en: "/[locale]/product/[slug]",
649
+ fr: "/[locale]/produit/[slug]",
640
650
  },
641
- "/blog/[category]/[id]": {
642
- en: "/blog/[category]/[id]",
643
- fr: "/journal/[category]/[id]",
651
+ "/[locale]/blog/[category]/[id]": {
652
+ en: "/[locale]/blog/[category]/[id]",
653
+ fr: "/[locale]/journal/[category]/[id]",
644
654
  },
645
- },
655
+ }),
646
656
  }
647
657
  ```
648
658
  - _Note_: The rewrite rules take precedence over the default `mode` behaviour. If a path matches a rewrite rule, the localised path from the rewrite configuration will be used instead of the standard locale prefixing.
649
659
  - _Note_: Dynamic route parameters are supported using bracket notation (e.g., `[slug]`, `[id]`). The parameter values are automatically extracted from the URL and interpolated into the rewritten path.
650
660
  - _Note_: Works with both Next.js and Vite applications. The middleware/proxy will automatically rewrite incoming requests to match the internal route structure.
651
661
  - _Note_: When generating URLs with `getLocalizedUrl()`, the rewrite rules are automatically applied if they match the provided path.
662
+ - _Reference_: For more information, see [Custom URL Rewrites](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/custom_url_rewrites.md).
652
663
 
653
664
  - **serverSetCookie**:
654
665
  - _Type_: `string`
@@ -942,6 +953,12 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
942
953
  - _Note_: If 'manual', the build will be set only when the build command is executed.
943
954
  - _Note_: Can be used to disable dictionaries build, for instance when execution on Node.js environment should be avoided.
944
955
 
956
+ - **checkTypes**:
957
+ - _Type_: `boolean`
958
+ - _Default_: `false`
959
+ - _Description_: Indicates if the build should check TypeScript types and log errors.
960
+ - _Note_: This can slow down the build.
961
+
945
962
  - **optimize**:
946
963
  - _Type_: `boolean`
947
964
  - _Default_: `process.env.NODE_ENV === 'production'`
@@ -26,11 +26,17 @@ El comando `intlayer init skills` es la forma más fácil de configurar las habi
26
26
  npx intlayer init skills
27
27
  ```
28
28
 
29
+ O usando el SDK de Vercel Skill
30
+
31
+ ```bash
32
+ npx skills add aymericzip/intlayer-skills
33
+ ```
34
+
29
35
  Cuando ejecutas este comando, este:
30
36
 
31
37
  1. Detectará el framework que estás usando (por ejemplo, Next.js, React, Vite).
32
38
  2. Te preguntará para qué plataformas quieres instalar las habilidades (Cursor, Windsurf, VS Code, OpenCode, Claude Code, GitHub Copilot Workspace, etc.).
33
- 3. Generará los archivos de configuración necesarios (p. ej., `.cursor/skills/intlayer_next_js/SKILL.md`, `.windsurf/skills/intlayer_next_js/SKILL.md`, `.opencode/skills/intlayer_next_js/SKILL.md`, `.vscode/mcp.json`, etc.).
39
+ 3. Generará los archivos de configuración necesarios (p. ej., `.cursor/skills/intlayer-next-js/SKILL.md`, `.windsurf/skills/intlayer-next-js/SKILL.md`, `.opencode/skills/intlayer-next-js/SKILL.md`, `.vscode/mcp.json`, etc.).
34
40
 
35
41
  ## Plataformas Soportadas
36
42
 
@@ -13,6 +13,10 @@ slugs:
13
13
  - concept
14
14
  - cli
15
15
  - build
16
+ history:
17
+ - version: 8.1.5
18
+ date: 2026-02-23
19
+ changes: Añadir opción checkTypes
16
20
  ---
17
21
 
18
22
  # Construir Diccionarios
@@ -62,3 +66,7 @@ Este comando encontrará tus archivos de declaración de contenido por defecto e
62
66
  - **`--no-cache`**: Deshabilitar la caché.
63
67
 
64
68
  > Ejemplo: `npx intlayer build --no-cache`
69
+
70
+ - **`--check-types`**: Comprueba los tipos de los archivos de declaración de contenido.
71
+
72
+ > Ejemplo: `npx intlayer build --check-types`
@@ -134,7 +134,7 @@ Para ver cómo configurar los locales disponibles u otros parámetros, consulta
134
134
 
135
135
  ### Gestión de Componentes
136
136
 
137
- - **[Transformar Componentes](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/transform.md)** - Transforma componentes existentes para usar Intlayer
137
+ - **[Transformar Componentes](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/extract.md)** - Transforma componentes existentes para usar Intlayer
138
138
 
139
139
  ### Configuración
140
140
 
@@ -49,7 +49,7 @@ Si bien el compilador ofrece una excelente experiencia de "funciona sin más", t
49
49
 
50
50
  Para una comparación arquitectónica más profunda, consulta el artículo del blog [Compiler vs. Declarative i18n](https://github.com/aymericzip/intlayer/blob/main/docs/blog/es/compiler_vs_declarative_i18n.md).
51
51
 
52
- Como alternativa, para automatizar tu proceso i18n mientras mantienes el control total de tu contenido, Intlayer también proporciona un comando de auto-extracción `intlayer transform` (consulta la [documentación CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/transform.md)), o el comando `Intlayer: extract content to Dictionary` de la extensión Intlayer VS Code (consulta la [documentación de la extensión VS Code](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/vs_code_extension.md)).
52
+ Como alternativa, para automatizar tu proceso i18n mientras mantienes el control total de tu contenido, Intlayer también proporciona un comando de auto-extracción `intlayer extract` (consulta la [documentación CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/extract.md)), o el comando `Intlayer: extract content to Dictionary` de la extensión Intlayer VS Code (consulta la [documentación de la extensión VS Code](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/vs_code_extension.md)).
53
53
 
54
54
  ## Uso
55
55
 
@@ -85,6 +85,7 @@ Intlayer acepta formatos de archivo de configuración JSON, JS, MJS y TS:
85
85
 
86
86
  ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
87
87
  import { Locales, type IntlayerConfig } from "intlayer";
88
+ import { nextjsRewrite } from "intlayer/routing";
88
89
  import { z } from "zod";
89
90
 
90
91
  /**
@@ -191,12 +192,12 @@ const config: IntlayerConfig = {
191
192
  /**
192
193
  * Custom URL rewriting rules for locale-specific paths.
193
194
  */
194
- rewrite: {
195
- "/about": {
196
- en: "/about",
197
- fr: "/a-propos",
195
+ rewrite: nextjsRewrite({
196
+ "/[locale]/about": {
197
+ en: "/[locale]/about",
198
+ fr: "/[locale]/a-propos",
198
199
  },
199
- },
200
+ }),
200
201
  },
201
202
 
202
203
  /**
@@ -342,6 +343,12 @@ const config: IntlayerConfig = {
342
343
  * Default: ['esm', 'cjs']
343
344
  */
344
345
  outputFormat: ["esm"],
346
+
347
+ /**
348
+ * Indicates if the build should check TypeScript types.
349
+ * Default: false
350
+ */
351
+ checkTypes: false,
345
352
  },
346
353
 
347
354
  /**
@@ -416,7 +423,10 @@ const config: IntlayerConfig = {
416
423
  /**
417
424
  * Pattern to traverse the code to optimize.
418
425
  */
419
- transformPattern: ["**/*.{js,ts,mjs,cjs,jsx,tsx}", "!**/node_modules/**"],
426
+ transformPattern: [
427
+ "**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
428
+ "!**/node_modules/**",
429
+ ],
420
430
 
421
431
  /**
422
432
  * Pattern to exclude from the optimization.
@@ -629,26 +639,27 @@ Configuraciones que controlan el comportamiento del middleware, incluyendo cómo
629
639
  ```typescript
630
640
  routing: {
631
641
  mode: "prefix-no-default", // Estrategia de respaldo
632
- rewrite: {
633
- "/about": {
634
- en: "/about",
635
- fr: "/a-propos",
642
+ rewrite: nextjsRewrite({
643
+ "/[locale]/about": {
644
+ en: "/[locale]/about",
645
+ fr: "/[locale]/a-propos",
636
646
  },
637
- "/product/[slug]": {
638
- en: "/product/[slug]",
639
- fr: "/produit/[slug]",
647
+ "/[locale]/product/[slug]": {
648
+ en: "/[locale]/product/[slug]",
649
+ fr: "/[locale]/produit/[slug]",
640
650
  },
641
- "/blog/[category]/[id]": {
642
- en: "/blog/[category]/[id]",
643
- fr: "/journal/[category]/[id]",
651
+ "/[locale]/blog/[category]/[id]": {
652
+ en: "/[locale]/blog/[category]/[id]",
653
+ fr: "/[locale]/journal/[category]/[id]",
644
654
  },
645
- },
655
+ }),
646
656
  }
647
657
  ```
648
658
  - _Nota_: Las reglas de reescritura tienen prioridad sobre el comportamiento del `mode` predeterminado. Si una ruta coincide con una regla de reescritura, se usará la ruta localizada de la configuración de reescritura en lugar del prefijo de idioma estándar.
649
659
  - _Nota_: Se admiten parámetros de ruta dinámicos usando la notación de corchetes (por ejemplo, `[slug]`, `[id]`). Los valores de los parámetros se extraen automáticamente de la URL y se interpolan en la ruta reescrita.
650
660
  - _Nota_: Funciona con aplicaciones Next.js y Vite. El middleware/proxy reescribirá automáticamente las solicitudes entrantes para que coincidan con la estructura de ruta interna.
651
661
  - _Nota_: Al generar URLs con `getLocalizedUrl()`, las reglas de reescritura se aplican automáticamente si coinciden con la ruta proporcionada.
662
+ - _Referencia_: Para más información, consulte [Reescrituras de URL personalizadas](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/custom_url_rewrites.md).
652
663
 
653
664
  - **serverSetCookie**:
654
665
  - _Tipo_: `string`
@@ -936,6 +947,12 @@ Las opciones de compilación se aplican a los plugins `@intlayer/babel` y `@intl
936
947
  - _Nota_: Si 'manual', la compilación se establecerá solo cuando se ejecute el comando de compilación.
937
948
  - _Nota_: Puede usarse para deshabilitar la compilación de diccionarios, por ejemplo cuando se debe evitar la ejecución en un entorno Node.js.
938
949
 
950
+ - **checkTypes**:
951
+ - _Type_: `boolean`
952
+ - _Default_: `false`
953
+ - _Description_: Indica si la compilación debe comprobar los tipos de TypeScript y registrar errores.
954
+ - _Note_: Esto puede ralentizar la compilación.
955
+
939
956
  - **optimize**:
940
957
  - _Tipo_: `boolean`
941
958
  - _Por defecto_: `process.env.NODE_ENV === 'production'`
@@ -26,11 +26,17 @@ La commande `intlayer init skills` est le moyen le plus simple de configurer les
26
26
  npx intlayer init skills
27
27
  ```
28
28
 
29
+ Ou en utilisant le SDK Vercel Skill
30
+
31
+ ```bash
32
+ npx skills add aymericzip/intlayer-skills
33
+ ```
34
+
29
35
  Lorsque vous exécutez cette commande, elle :
30
36
 
31
37
  1. Détecte le framework que vous utilisez (ex: Next.js, React, Vite).
32
38
  2. Vous demande pour quelles plateformes vous souhaitez installer des compétences (Cursor, Windsurf, VS Code, OpenCode, Claude Code, GitHub Copilot Workspace, etc.).
33
- 3. Génère les fichiers de configuration requis (ex: `.cursor/skills/intlayer_next_js/SKILL.md`, `.windsurf/skills/intlayer_next_js/SKILL.md`, `.opencode/skills/intlayer_next_js/SKILL.md`, `.vscode/mcp.json`, etc.).
39
+ 3. Génère les fichiers de configuration requis (ex: `.cursor/skills/intlayer-next-js/SKILL.md`, `.windsurf/skills/intlayer-next-js/SKILL.md`, `.opencode/skills/intlayer-next-js/SKILL.md`, `.vscode/mcp.json`, etc.).
34
40
 
35
41
  ## Plateformes supportées
36
42
 
@@ -13,6 +13,10 @@ slugs:
13
13
  - concept
14
14
  - cli
15
15
  - build
16
+ history:
17
+ - version: 8.1.5
18
+ date: 2026-02-23
19
+ changes: Ajouter l'option checkTypes
16
20
  ---
17
21
 
18
22
  # Construire des Dictionnaires
@@ -62,3 +66,7 @@ Cette commande trouvera par défaut vos fichiers de déclaration de contenu sous
62
66
  - **`--no-cache`** : Désactiver le cache.
63
67
 
64
68
  > Exemple : `npx intlayer build --no-cache`
69
+
70
+ - **`--check-types`**: Vérifie les types des fichiers de déclaration de contenu.
71
+
72
+ > Exemple : `npx intlayer build --check-types`
@@ -134,7 +134,7 @@ Pour voir comment configurer les locales disponibles, ou d'autres paramètres, r
134
134
 
135
135
  ### Gestion des composants
136
136
 
137
- - **[Transformer les composants](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/transform.md)** - Transformer les composants existants pour utiliser Intlayer
137
+ - **[Transformer les composants](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/extract.md)** - Transformer les composants existants pour utiliser Intlayer
138
138
 
139
139
  ### Configuration
140
140
 
@@ -49,7 +49,7 @@ Bien que le compilateur offre une excellente expérience "fonctionne tout seul",
49
49
 
50
50
  Pour une comparaison architecturale plus approfondie, consultez l'article de blog [Compiler vs. Declarative i18n](https://github.com/aymericzip/intlayer/blob/main/docs/blog/fr/compiler_vs_declarative_i18n.md).
51
51
 
52
- Comme alternative, pour automatiser votre processus i18n tout en gardant un contrôle total de votre contenu, Intlayer fournit également une commande d'auto-extraction `intlayer transform` (voir la [documentation CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/transform.md)), ou la commande `Intlayer: extract content to Dictionary` de l'extension Intlayer VS Code (voir la [documentation de l'extension VS Code](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/vs_code_extension.md)).
52
+ Comme alternative, pour automatiser votre processus i18n tout en gardant un contrôle total de votre contenu, Intlayer fournit également une commande d'auto-extraction `intlayer extract` (voir la [documentation CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/extract.md)), ou la commande `Intlayer: extract content to Dictionary` de l'extension Intlayer VS Code (voir la [documentation de l'extension VS Code](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/vs_code_extension.md)).
53
53
 
54
54
  ## Utilisation
55
55