forked from pulibrary/orcid_princeton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
34 lines (32 loc) · 820 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
import { defineConfig } from 'vite';
import FullReload from 'vite-plugin-full-reload';
import RubyPlugin from 'vite-plugin-ruby';
import StimulusHMR from 'vite-plugin-stimulus-hmr';
import vue from '@vitejs/plugin-vue';
const path = require('path');
export default ({ command, mode }) => {
let minifySetting;
if (mode === 'development') {
minifySetting = false;
} else {
minifySetting = 'esbuild';
}
return {
clearScreen: false,
build: {
minify: minifySetting,
},
resolve: {
alias: {
'~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'),
vue: 'vue/dist/vue.esm-bundler',
},
},
plugins: [
RubyPlugin(),
StimulusHMR(),
FullReload(['config/routes.rb', 'app/views/**/*'], { delay: 300 }),
vue(),
],
};
};