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
Copy file name to clipboardExpand all lines: web/docs/project/custom-vite-config.md
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,12 @@ title: Custom Vite Config
4
4
5
5
import { ShowForTs, ShowForJs } from '@site/src/components/TsJsHelpers'
6
6
7
-
Wasp uses [Vite](https://vitejs.dev/) for serving the client during development and bundling it for production. If you want to customize the Vite config, you can do that by creating a`vite.config.js` or `vite.config.ts` file in your `src/client` directory.
7
+
Wasp uses [Vite](https://vitejs.dev/) for serving the client during development and bundling it for production. If you want to customize the Vite config, you can do that by editing the`vite.config.ts` file in your `src/client` directory.
8
8
9
-
Wasp will use your config and **merge** it with the default Wasp's Vite config.
9
+
Wasp will use your config and **merge** it with the default Wasp's Vite config.
10
10
11
11
Vite config customization can be useful for things like:
12
+
12
13
- Adding custom Vite plugins.
13
14
- Customising the dev server.
14
15
- Customising the build process.
@@ -33,6 +34,7 @@ export default {
33
34
},
34
35
}
35
36
```
37
+
36
38
</TabItem>
37
39
<TabItemvalue="ts"label="TypeScript">
38
40
@@ -45,6 +47,7 @@ export default defineConfig({
45
47
},
46
48
})
47
49
```
50
+
48
51
</TabItem>
49
52
</Tabs>
50
53
@@ -58,31 +61,32 @@ You have access to all of the [Vite dev server options](https://vitejs.dev/confi
Copy file name to clipboardExpand all lines: web/docs/tutorial/02-project-structure.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,8 @@ By _your code_, we mean the _"the code you write"_, as opposed to the code gener
34
34
-`src/shared`: Contains code that may be executed on both the client and server.
35
35
36
36
Many of the other files (`tsconfig.json`, `vite-env.d.ts`, etc.) are used by your IDE to improve your development experience with tools like autocompletion, intellisense, and error reporting.
37
+
The file `vite.config.ts` is used to configure [Vite](https://vitejs.dev/guide/), Wasp's build tool of choice.
38
+
We won't be configuring Vite in this tutorial, so you can safely ignore the file. Still, if you ever end up wanting more control over Vite, you'll find everything you need to know in [custom Vite config docs](/docs/project/custom-vite-config.md).
37
39
38
40
:::note TypeScript Support
39
41
Wasp supports TypeScript out of the box, but you are free to choose between or mix JavaScript and TypeScript as you see fit.
0 commit comments