1 Star 0 Fork 0

nestScript/Metro-training-simulation-platform

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.ts 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
shanshenghui 提交于 2023-12-28 12:29 . feat: tauri
import { defineConfig, loadEnv } from "vite";
import path from "path";
import vue from "@vitejs/plugin-vue";
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
import tailwindcss from "tailwindcss";
import { resolve } from "path";
import vueSetupExtend from "vite-plugin-vue-setup-extend";
// https://vitejs.dev/config/
export default ({ mode }) => {
const env = loadEnv(mode, process.cwd());
return defineConfig({
build: {
assetsInlineLimit: 0,
},
define: {
"process.env": env,
},
resolve: {
alias: {
"@": path.join(__dirname, "src"),
},
},
plugins: [
vue(),
createSvgIconsPlugin({
iconDirs: [resolve(process.cwd(), "src/assets/icons")],
symbolId: "icon-[dir]-[name]",
}),
vueSetupExtend(),
],
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true,
additionalData: [],
modifyVars: {
"primary-color": "#169bd5",
},
},
},
postcss: {
plugins: [tailwindcss()],
},
},
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
//
// 1. prevent vite from obscuring rust errors
clearScreen: false,
// 2. tauri expects a fixed port, fail if that port is not available
server: {
port: 1420,
strictPort: true,
watch: {
// 3. tell vite to ignore watching `src-tauri`
ignored: ["**/src-tauri/**"],
},
},
});
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/xrwork/metro-training-simulation-platform.git
[email protected]:xrwork/metro-training-simulation-platform.git
xrwork
metro-training-simulation-platform
Metro-training-simulation-platform
master

搜索帮助