-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
vite.config.ts
39 lines (38 loc) · 1.2 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
import { esbuildFlowPlugin, flowPlugin } from '@bunchtogether/vite-plugin-flow'
import React from '@vitejs/plugin-react-swc'
import { resolve } from 'path'
import { defineConfig } from 'vite'
import Rails from 'vite-plugin-rails'
import tsconfigPaths from 'vite-tsconfig-paths'
export default defineConfig({
assetsInclude: ['**/*.md'],
optimizeDeps: {
esbuildOptions: {
plugins: [esbuildFlowPlugin()],
},
},
plugins: [
flowPlugin(),
Rails({
fullReload: {
additionalPaths: ['config/routes.rb', 'app/views/**/*'],
delay: 200,
},
}),
React(),
tsconfigPaths(),
],
resolve: {
alias: {
'@': resolve(__dirname, 'app/javascript/lca'),
Docs: resolve(__dirname, 'docs'),
components: resolve(__dirname, 'app/javascript/lca/components'),
containers: resolve(__dirname, 'app/javascript/lca/containers'),
ducks: resolve(__dirname, 'app/javascript/lca/ducks'),
icons: resolve(__dirname, 'app/javascript/lca/icons'),
selectors: resolve(__dirname, 'app/javascript/lca/selectors'),
styles: resolve(__dirname, 'app/javascript/lca/styles'),
utils: resolve(__dirname, 'app/javascript/lca/utils'),
},
},
})