@lingui/swc-plugin 6.0.0 → 6.1.0
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/README.md
CHANGED
|
@@ -62,6 +62,10 @@ https://swc.rs/docs/configuration/swcrc
|
|
|
62
62
|
// IMPORTANT: This option is temporal and will be removed in the next major release.
|
|
63
63
|
// "useLinguiV5IdGeneration": true
|
|
64
64
|
//
|
|
65
|
+
// Optional. Restricts directive-based idPrefix application to explicit ids
|
|
66
|
+
// starting with this leader string, while keeping the leader in the final id.
|
|
67
|
+
// "idPrefixLeader": "."
|
|
68
|
+
//
|
|
65
69
|
// To configure custom JSX placeholder attribute and its defaults:
|
|
66
70
|
// "jsxPlaceholderAttribute": "_t",
|
|
67
71
|
// "jsxPlaceholderDefaults": {
|
|
@@ -87,6 +91,16 @@ Controls which fields are preserved in the transformed message descriptors. Acce
|
|
|
87
91
|
|
|
88
92
|
Check [this article](https://lingui.dev/guides/optimizing-bundle-size) for more info about this configuration.
|
|
89
93
|
|
|
94
|
+
### `idPrefixLeader`
|
|
95
|
+
|
|
96
|
+
Controls how directive-based `idPrefix` values are applied to explicit message ids.
|
|
97
|
+
|
|
98
|
+
- When omitted, `idPrefix` is prepended to explicit static ids.
|
|
99
|
+
- When set, `idPrefix` is prepended only when the explicit static id starts with the configured leader string.
|
|
100
|
+
- Auto-generated hash ids are never prefixed.
|
|
101
|
+
|
|
102
|
+
See [Lingui macro docs](https://lingui.dev/ref/macro) for comment directive syntax and semantics. The SWC plugin matches the Babel macro behavior.
|
|
103
|
+
|
|
90
104
|
Or Next JS Usage:
|
|
91
105
|
|
|
92
106
|
`next.config.js`
|
package/package.json
CHANGED
|
Binary file
|