You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
besure_app/vite.config.js

49 lines
1.1 KiB
JavaScript

import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
function padNumber(value) {
return String(value).padStart(2, '0')
}
function createBuildVersion() {
const now = new Date()
return [
now.getFullYear(),
padNumber(now.getMonth() + 1),
padNumber(now.getDate())
].join('') + [
padNumber(now.getHours()),
padNumber(now.getMinutes()),
padNumber(now.getSeconds())
].join('')
}
export default defineConfig(() => {
const buildVersion = createBuildVersion()
return {
base: '/',
define: {
__APP_BUILD_VERSION__: JSON.stringify(buildVersion)
},
build: {
outDir: 'dist',
},
server: {
port: 5173,
proxy: {
'/admin-api': {
target: 'http://47.106.185.127:8089',
changeOrigin: true
}
}
},
plugins: [
uni()
],
exclude:[
/\/README\.md$/,
]
}
})