-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathvite.config.js
More file actions
36 lines (34 loc) · 967 Bytes
/
Copy pathvite.config.js
File metadata and controls
36 lines (34 loc) · 967 Bytes
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
// vite.config.js
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
plugins: [
react({
include: '**/*.{jsx,js}'
})
],
publicDir: 'public',
resolve: {
alias: {
api: path.resolve(__dirname, './src/api.js'),
utilities: path.resolve(__dirname, './src/utilities'),
components: path.resolve(__dirname, './src/components'),
pages: path.resolve(__dirname, './src/pages'),
assets: path.resolve(__dirname, './src/assets'),
__mocks__: path.resolve(__dirname, './src/__mocks__'),
host: path.resolve(__dirname, './src/host.js'),
session: path.resolve(__dirname, './src/session.js')
}
},
build: {
outDir: 'build'
},
esbuild: {
loader: 'jsx',
include: /src\/.*\.[jt]sx?$/,
exclude: []
}
});