Skip to content

Commit b51ec8b

Browse files
committed
updated how to use vite page
Signed-off-by: bidi <bidi@apidemia.com>
1 parent b2c26e7 commit b51ec8b

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

docs/book/v1/how-tos/bundle-static-modules.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Bundle Static Modules
22

3-
Vite is a frontend dev tool we use:
3+
[Vite](https://vite.dev/) is a frontend dev tool we use:
44

55
- To avoid network bottlenecks that can occur when your application has a lot of separate scripts and style sheets.
66
- To concatenate and compress (uglify) `.css` and `.js` files
@@ -12,16 +12,28 @@ First you need to install dependencies into the `node_modules` directory by runn
1212
```shell
1313
npm install
1414
```
15-
16-
If `npm install` fails, this could be caused by user permissions of npm.
17-
Recommendation is to install npm through `Node Version Manager`.
15+
If everything ran ok, you should see a new root folder named `node_modules` where all the npm packages are installed.
16+
If `npm install` fails, this could be caused by user permissions for npm.
17+
Our recommendation is to install npm through `Node Version Manager`.
1818

1919
The build command compiles the components then monitors the source files and triggers their recompilation when one of them is changed:
2020

2121
```shell
2222
npm run build
2323
```
2424

25+
Initially, Vite is configured to delete and rebuild the contents of these folders from the `public` folder':
26+
27+
- css
28+
- fonts
29+
- images
30+
- js
31+
32+
The folders are populated from their counterparts in `src/App/assets`.
33+
34+
> Make sure to not edit anything inside the four public folders manually.
35+
> Other folders and the three initial files in the public folder will be left as is.
36+
2537
To review the project via Vite, you can use this command that starts the PHP server on port 8080:
2638

2739
```shell

0 commit comments

Comments
 (0)