-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
49 lines (47 loc) · 985 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
40
41
42
43
44
45
46
47
48
49
import { quasar, transformAssetUrls } from '@quasar/vite-plugin';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import { join } from 'desm';
import * as fs from 'node:fs';
import type { Plugin } from 'rollup';
import { defineConfig } from 'vite';
import jsImports from 'vite-plugin-js-imports';
import windiCss from 'vite-plugin-windicss';
function copyWasm(): Plugin {
return {
name: 'copy-wasm',
generateBundle() {
fs.copyFileSync(
'./node_modules/esbuild-wasm/esbuild.wasm',
'./dist/esbuild.wasm'
);
fs.copyFileSync(
'./node_modules/vscode-oniguruma/release/onig.wasm',
'./dist/onig.wasm'
);
},
};
}
export default defineConfig({
resolve: {
alias: {
'~': join(import.meta.url, 'src'),
},
},
plugins: [
vue({
reactivityTransform: true,
template: {
transformAssetUrls,
},
}),
windiCss(),
quasar(),
copyWasm(),
jsImports(),
vueJsx(),
],
build: {
minify: false,
},
});