-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
43 lines (42 loc) · 1.04 KB
/
vite.config.js
File metadata and controls
43 lines (42 loc) · 1.04 KB
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
40
41
42
43
import path from 'path';
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { viteStaticCopy } from 'vite-plugin-static-copy'
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@hoc': path.resolve(__dirname, './src/hoc'),
'@hooks': path.resolve(__dirname, './src/hooks'),
'@assets': path.resolve(__dirname, './src/assets'),
'@context': path.resolve(__dirname, './src/context'),
'@components': path.resolve(__dirname, './src/components'),
},
},
plugins: [
react(),
// copy wasm static files to dist
viteStaticCopy({
targets: [
{
src: 'wasm/wasm.js',
dest: 'wasm'
},
{
src: 'wasm/wasm.wasm',
dest: 'wasm'
},
{
src: '.gitignore',
dest: ''
}
]
})
],
// or you can run your app at the below mentioned base url
base: "/react-cpp-wasm-app",
build: {
outDir: 'docs',
},
})