-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathvite.config.ts
39 lines (37 loc) · 1021 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { defineConfig } from 'vite'
import path from 'node:path'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: [
{
find: /^~/,
replacement: path.resolve(__dirname, 'src'),
},
],
extensions: ['.mjs', '.cjs', '.js', '.ts', '.jsx', '.tsx', '.json'],
},
build: {
manifest: true,
assetsInlineLimit: 0,
rollupOptions: {
input: 'index.html',
// Material ui's "use client" directive causes a warning.
// This function ignores those warnings.
// See https://github.com/rollup/rollup/issues/4699#issuecomment-1571555307
// for more information.
onwarn(warning, warn) {
if (
warning.code === 'MODULE_LEVEL_DIRECTIVE' &&
warning.message.includes('use client')
) {
return
}
warn(warning)
},
},
outDir: '.stormkit/public',
},
plugins: [react({ jsxImportSource: '@emotion/react' })],
})