babel-plugin-saykit 0.10.0 → 0.11.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 +21 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,6 +26,27 @@ export default {
|
|
|
26
26
|
};
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
### Catalogues
|
|
30
|
+
|
|
31
|
+
By default the plugin inlines each imported catalogue into the module that imports it, which works anywhere Babel runs but does not hot-reload. Under Next.js or Metro, set `catalogues: 'module'` and let the bundler serve catalogues as real modules:
|
|
32
|
+
|
|
33
|
+
```json title=".babelrc"
|
|
34
|
+
{
|
|
35
|
+
"presets": ["next/babel"],
|
|
36
|
+
"plugins": [["saykit", { "catalogues": "module" }]]
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```js title="next.config.mjs"
|
|
41
|
+
import { withSayKit } from 'babel-plugin-saykit/next';
|
|
42
|
+
|
|
43
|
+
export default withSayKit({
|
|
44
|
+
// your config
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For Metro, use `withSayKit` from `babel-plugin-saykit/metro` in `metro.config.js` instead.
|
|
49
|
+
|
|
29
50
|
## Documentation
|
|
30
51
|
|
|
31
52
|
See [saykit.js.org/integrations/babel](https://saykit.js.org/integrations/babel).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-plugin-saykit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Babel plugin for SayKit",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"provenance": true
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@saykit/config": "^0.
|
|
51
|
+
"@saykit/config": "^0.11.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@babel/core": "^7.29.7",
|