-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
52 lines (51 loc) · 1.23 KB
/
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
50
51
52
/// <reference types="vitest" />
import react from '@vitejs/plugin-react';
import autoprefixer from 'autoprefixer';
import { defineConfig } from 'vite';
import svgrPlugin from 'vite-plugin-svgr';
import viteTsconfigPaths from 'vite-tsconfig-paths';
// https://vitejs.dev/config/
export default defineConfig({
assetsInclude: ['**/*.xlsx'],
build: {
outDir: 'build',
// Node modules that use `require` statements need to be transpiled to use `import`
// One of the problematic modules is (at time of writing) @okta/okta-signin-widget
commonjsOptions: {
transformMixedEsModules: true
}
},
plugins: [react(), viteTsconfigPaths(), svgrPlugin()],
server: {
watch: {
usePolling: true
},
host: true,
strictPort: true,
port: 3005
},
preview: {
port: 3005
},
css: {
devSourcemap: true,
preprocessorOptions: {
scss: {
sourceMap: true,
includePaths: [
'./src/stylesheets',
'./node_modules/@uswds/uswds/packages'
]
}
},
postcss: {
plugins: [autoprefixer]
}
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/tests/config.ts',
globalSetup: './src/config/global-setup.js'
}
});