Skip to content

Commit 74cb5b8

Browse files
committed
Revert "[update] vite locale code"
This reverts commit 1a4c224.
1 parent 4ccc707 commit 74cb5b8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

part-iv-toolchain/using-with-vite.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Using with Vite
22

3-
Starting with Webix Jet 3.0, the toolchain has been migrated to Vite. Read more about it [here](https://webix.gitbook.io/webix-jet/part-iv-toolchain/big-app-development). There are some differences from usage with WebPack:
3+
You can use Jet with other app bundlers instead of WebPack. For example, [Vite](https://vitejs.dev/). There are some differences from usage with WebPack:
44

55
- the `.env` file is added, it stores global constants:
66

@@ -72,10 +72,11 @@ export default class MyApp extends JetApp{
7272
//...
7373

7474
// patch locales loader, optional
75-
this.use(plugins.Locale, {
76-
path: words,
77-
storage: this.webix.storage.session
78-
});
75+
this.use(plugins.Locale, { path: false, storage: this.webix.storage.session });
76+
const ls = this.getService("locale");
77+
ls.setLang = (lang, silent) =>
78+
words(lang).then(w => ls.setLangData(lang, w, silent));
79+
ls.setLang(ls.getLang(), true);
7980
}
8081
}
8182
```
@@ -97,4 +98,4 @@ export default class MyApp extends JetApp{
9798
9899
- the dev server is at ```http://localhost:5173```.
99100

100-
You can see the full code of the demo [here](https://github.com/webix-hub/jet-start/tree/master).
101+
You can see the full code of the demo in the [vite branch of jet-start](https://github.com/webix-hub/jet-start/tree/vite).

0 commit comments

Comments
 (0)