1 Star 0 Fork 146

dietrich/IofTV-Screen-Vue3

forked from daidai/IofTV-Screen-Vue3 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
daidai 提交于 2024-08-20 15:25 . refactor: 更新commit,从头做起
import type { UserConfig, ConfigEnv } from 'vite';
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from "path";
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
//https://github.com/element-plus/unplugin-element-plus/blob/HEAD/README.zh-CN.md
import ElementPlus from 'unplugin-element-plus/vite'
export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
// const env = loadEnv(mode, process.cwd(), '')
console.log(command, mode);
return {
plugins: [vue(),
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
ElementPlus({
// useSource: true
})
],
publicDir: "public",
base: "./",
server: {
host: '0.0.0.0',
port: 8112,
open: false,
strictPort: false,
// proxy: {}
},
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
"components": resolve(__dirname, "./src/components"),
"api": resolve(__dirname, "./src/api"),
},
},
css: {
// css预处理器
preprocessorOptions: {
scss: {
// charset: false,
additionalData: `@use "./src/assets/css/variable.scss" as *;`,
},
},
},
build: {
outDir: 'dist',
},
}
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/dietrich/IofTV-Screen-Vue3.git
git@gitee.com:dietrich/IofTV-Screen-Vue3.git
dietrich
IofTV-Screen-Vue3
IofTV-Screen-Vue3
master

搜索帮助