feat:uniapp模块
This commit is contained in:
34
uniapp/vite.config.js
Normal file
34
uniapp/vite.config.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import uni from '@dcloudio/vite-plugin-uni'
|
||||
import path from 'path'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [uni()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, 'src')
|
||||
}
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
api: 'modern-compiler'
|
||||
}
|
||||
}
|
||||
},
|
||||
server: {
|
||||
port: 2093,
|
||||
proxy: {
|
||||
'/dev-api': {
|
||||
target: 'http://8.133.20.230:8082',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/dev-api/, '')
|
||||
},
|
||||
'/prod-api': {
|
||||
target: 'http://8.133.20.230:8082',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/prod-api/, '')
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user