1 Star 0 Fork 0

龙土新/tuxin-app-mini-vue3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 1.24 KB
一键复制 编辑 原始数据 按行查看 历史
longtuxin 提交于 2024-10-31 22:55 +08:00 . feat: first commit
import path from 'node:path'
import process from 'node:process'
import { loadEnv } from 'vite'
import type { ConfigEnv, UserConfig } from 'vite'
import viewport from 'postcss-mobile-forever'
import autoprefixer from 'autoprefixer'
import { createVitePlugins } from './build/vite'
export default ({ mode }: ConfigEnv): UserConfig => {
const root = process.cwd()
const env = loadEnv(mode, root)
return {
base: env.VITE_APP_PUBLIC_PATH,
plugins: createVitePlugins(),
server: {
host: true,
port: 3000,
proxy: {
'/api': {
target: '',
ws: false,
changeOrigin: true,
},
},
},
resolve: {
alias: {
'~@': path.join(__dirname, './src'),
'@': path.join(__dirname, './src'),
'~': path.join(__dirname, './src/assets'),
},
},
css: {
postcss: {
plugins: [
autoprefixer(),
viewport({
appSelector: '#app',
viewportWidth: 375,
maxDisplayWidth: 600,
appContainingBlock: 'auto',
necessarySelectorWhenAuto: '.app-wrapper',
}),
],
},
},
build: {
cssCodeSplit: false,
chunkSizeWarningLimit: 2048,
},
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/iamtoson/tuxin-app-mini-vue3.git
git@gitee.com:iamtoson/tuxin-app-mini-vue3.git
iamtoson
tuxin-app-mini-vue3
tuxin-app-mini-vue3
master

搜索帮助