forked from traPtitech/traPortfolio-UI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
farm.config.ts
34 lines (33 loc) · 823 Bytes
/
farm.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 '@farmfe/core'
import path from 'path'
import VuePlugin from '@vitejs/plugin-vue'
import PurgeIcons from 'vite-plugin-purge-icons'
import sass from '@farmfe/js-plugin-sass'
export default defineConfig({
compilation: {
sourcemap: false,
resolve: {
alias: {
'/@/': path.join(process.cwd(), 'src').replace(/\\/g, '/')
}
},
script: { plugins: [], target: 'es2018' }
},
server: {
proxy: {
'/api': {
target: 'http://localhost:4010',
rewrite: path =>
path.startsWith('/api/v1') ? path.slice('/api/v1'.length) : path,
changeOrigin: true
}
}
},
plugins: [
sass({
legacy: true,
additionalData: '@import "/@/styles/common.scss";'
})
],
vitePlugins: [VuePlugin(), PurgeIcons()]
})