|
@@ -1,5 +1,6 @@
|
|
import { resolve } from 'path'
|
|
import { resolve } from 'path'
|
|
|
|
|
|
|
|
+import UnoCSS from 'unocss/vite'
|
|
import viteCompression from 'vite-plugin-compression'
|
|
import viteCompression from 'vite-plugin-compression'
|
|
import { defineConfig, splitVendorChunkPlugin } from 'vite'
|
|
import { defineConfig, splitVendorChunkPlugin } from 'vite'
|
|
import legacy from '@vitejs/plugin-legacy'
|
|
import legacy from '@vitejs/plugin-legacy'
|
|
@@ -53,6 +54,7 @@ export default defineConfig(({ command }) => {
|
|
plugins: [
|
|
plugins: [
|
|
splitVendorChunkPlugin(),
|
|
splitVendorChunkPlugin(),
|
|
vue2(),
|
|
vue2(),
|
|
|
|
+ UnoCSS(),
|
|
ViteEjsPlugin({
|
|
ViteEjsPlugin({
|
|
assets: {
|
|
assets: {
|
|
version: Date.now()
|
|
version: Date.now()
|
|
@@ -91,7 +93,7 @@ export default defineConfig(({ command }) => {
|
|
},
|
|
},
|
|
less: {
|
|
less: {
|
|
modifyVars: {
|
|
modifyVars: {
|
|
- hack: `true; @import "@/assets/style/vant.theme.less";`
|
|
|
|
|
|
+ hack: 'true; @import "@/assets/style/vant.theme.less";'
|
|
},
|
|
},
|
|
javascriptEnabled: true
|
|
javascriptEnabled: true
|
|
}
|
|
}
|
|
@@ -102,12 +104,12 @@ export default defineConfig(({ command }) => {
|
|
port: 8080,
|
|
port: 8080,
|
|
proxy: {
|
|
proxy: {
|
|
'/jyapi': {
|
|
'/jyapi': {
|
|
- target: 'https://jybx3-webtest.jydev.jianyu360.com',
|
|
|
|
|
|
+ target: 'https://app5-jytest.jydev.jianyu360.com',
|
|
changeOrigin: true,
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/jyapi/, '')
|
|
rewrite: (path) => path.replace(/^\/jyapi/, '')
|
|
},
|
|
},
|
|
'/api': {
|
|
'/api': {
|
|
- target: 'https://jybx3-webtest.jydev.jianyu360.com',
|
|
|
|
|
|
+ target: 'https://app5-jytest.jydev.jianyu360.com',
|
|
changeOrigin: true,
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, '')
|
|
rewrite: (path) => path.replace(/^\/api/, '')
|
|
},
|
|
},
|