From 4d09676c2136fd70a42c0157a1261e49a579ee39 Mon Sep 17 00:00:00 2001 From: Willy Brauner Date: Thu, 17 Nov 2022 18:21:29 +0100 Subject: [PATCH] Update doc --- docs/02.vite-configuration.md | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/docs/02.vite-configuration.md b/docs/02.vite-configuration.md index 65ab7bf..9d35176 100644 --- a/docs/02.vite-configuration.md +++ b/docs/02.vite-configuration.md @@ -8,25 +8,12 @@ This one supports the dev-server, HMR and transformation & compilation. Vite's configuration is managed by two main files: - [vite.config.ts](vite.config.ts): contains the whole vite config [(vite config documentation)](https://vitejs.dev/config/) +- [vite.scripts.config.ts](vite.scripts.config.ts): contains the whole vite scripts config. It built scripts files relative to the SSR and SSG part. - [config/config.js](config/config.js): is the internal paths and tasks config file. ### Entry points -By default, the single application entrypoint is [src/index.tsx](src/index-client.tsx). It initializes a react App. -But this file can be changed as `index.ts` or `index.js`. In case this filename or type change, [config/config.js](config/config.js) -`input` array need to be modified. +Two entry points are set: -```js -input: [ - "src/index.tsx", // -> ex: modified as 'src/main.js' -] -``` - -Being an array, it is possible to define several application entry points. - -```js -input: ["src/main.ts", "src/second.ts"] -``` - -The default [base.twig](dist/front/www/views/layouts/base.twig) template, -is configured to add as script each input entrypoint automatically. +- server side [src/index-server.tsx](src/index-server.tsx) +- client side [src/index-client.tsx](src/index-client.tsx)