forked from eu-cdse/copernicus-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.mts
More file actions
28 lines (26 loc) · 702 Bytes
/
Copy pathvite.config.mts
File metadata and controls
28 lines (26 loc) · 702 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
import { defineConfig } from 'vite';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import react from '@vitejs/plugin-react-swc';
import svgrPlugin from 'vite-plugin-svgr';
import dns from 'dns';
dns.setDefaultResultOrder('verbatim');
// https://vitejs.dev/config/
export default defineConfig({
server: {
open: true,
host: 'localhost',
port: 3000,
},
preview: {
port: 3000,
},
base: '',
// https://stackoverflow.com/questions/78115258/module-has-been-externalized-for-browser-compatibility-error
plugins: [react(), svgrPlugin(), nodePolyfills()],
build: {
outDir: './build',
commonjsOptions: {
transformMixedEsModules: true,
},
},
});