1 Star 1 Fork 0

Grace/scaling-dollop

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import VueSetupExtend from 'vite-plugin-vue-setup-extend'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import topLevelAwait from 'vite-plugin-top-level-await'
import md from 'vite-plugin-md'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue({
include: [/\.vue$/, /\.md$/], // <--
}),
VueSetupExtend(),
Components({
resolvers: [
ElementPlusResolver({
importStyle: 'sass',
}),
],
}),
topLevelAwait({
// The export name of top-level await promise for each chunk module
promiseExportName: '__tla',
// The function to generate import names of top-level await promise in each chunk module
promiseImportName: i => `__tla_${i}`,
}),
md({
builders: [],
}),
],
resolve: {
// 配置路径别名
alias: {
'@': resolve(__dirname, './src'),
},
},
css: {
preprocessorOptions: {
scss: {
additionalData: '@use "@/styles/element-plus/index.scss" as *;',
},
},
},
base: './',
server: {
proxy: {
'/local': {
target: 'http://localhost:3000',
changeOrigin: true,
rewrite: path => path.replace(/^\/local/, ''),
},
'/api': {
target: 'http://123.57.2.173:3000/',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),
},
},
},
preview: {
host: true,
port: 5173,
},
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/Wang_Guo_shuai/scaling-dollop.git
git@gitee.com:Wang_Guo_shuai/scaling-dollop.git
Wang_Guo_shuai
scaling-dollop
scaling-dollop
main

搜索帮助