1 Star 0 Fork 103

师志强/workflow-web

forked from zhangjinlibra/workflow-web 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vite.config.prod.js 911 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhangjinlibra 提交于 2023-12-05 13:17 . [优化]
import { fileURLToPath, URL } from "node:url";
import path from "path";
import vue from "@vitejs/plugin-vue";
import { defineConfig, loadEnv } from "vite";
// https://vitejs.dev/config/
export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd());
// console.log("env", env, mode, command);
return {
mode: "production",
plugins: [vue()],
resolve: {
alias: [
{
// '@': fileURLToPath(new URL('./src', import.meta.url)),
// '@': path.resolve(__dirname, './src'),
"@": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "src"),
},
{
find: "vue",
replacement: "vue/dist/vue.esm-bundler.js", // 模块路径的替换, vue模块全部替换成vue.esm-bundler
},
],
},
server: {
host: "0.0.0.0",
https: false,
port: 5174,
},
};
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/shi_zhiqiang/workflow-engine.git
git@gitee.com:shi_zhiqiang/workflow-engine.git
shi_zhiqiang
workflow-engine
workflow-web
master

搜索帮助