You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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:
4
4
5
5
- the `.env` file is added, it stores global constants:
6
6
7
-
{% code-tabs %}
8
-
{% code-tabs-item title=".env" %}
9
-
```
7
+
```bash
10
8
APPNAME=Demo
11
9
VERSION=1.0.0
12
10
BUILD_AS_MODULE=false
13
11
```
14
-
{% endcode-tabs-item %}
15
-
{% endcode-tabs %}
16
12
17
13
To refer to the constants, use `import.meta.env.{name}`:
18
14
19
-
{% code-tabs %}
20
-
{% code-tabs-item title="app.js" %}
21
15
```javascript
16
+
// app.js
22
17
constdefaults= {
23
18
id :import.meta.env.APPNAME,
24
19
version :import.meta.env.VERSION,
@@ -33,14 +28,11 @@ if (!import.meta.env.BUILD_AS_MODULE){
33
28
webix.ready(() => newMyApp().render() );
34
29
}
35
30
```
36
-
{% endcode-tabs-item %}
37
-
{% endcode-tabs %}
38
31
39
32
- the `app.js` contains section that imports all files from the "views" folder and assigns custom view resolver to the app class:
0 commit comments