1 Star 0 Fork 0

Jerry/container-desktop

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.preload.mjs 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
Ionut Stoica 提交于 2024-09-12 17:49 +08:00 . Initial
import { createSingleFile, ENVIRONMENT, getCommonViteConfig, getElectronVendorsCache, sourceEnv } from "./vite.config.common.mjs";
/**
* @type {import('vite').UserConfig}
* @see https://vitejs.dev/config/
*/
export default ({ mode, command }) => {
sourceEnv(ENVIRONMENT);
const cache = getElectronVendorsCache();
const outputFormat = "es";
const config = getCommonViteConfig({ mode: mode || process.env.MODE || "development", command, outputName: "preload", outputFormat: outputFormat });
config.build.emptyOutDir = false;
config.build.ssr = true;
config.build.target = `node${cache.node}`;
config.build.lib = {
name: "preload",
entry: "src/electron-shell/preload.ts",
formats: [outputFormat]
};
// config.build.manifest = true;
config.build.rollupOptions.external = ["electron"];
config.build.rollupOptions.preserveEntrySignatures = "exports-only";
config.build.rollupOptions.output.exports = "auto";
config.build.rollupOptions.output.format = outputFormat;
if (ENVIRONMENT === "production") {
config.plugins.push(createSingleFile(false));
}
return config;
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/JerryFox/container-desktop.git
git@gitee.com:JerryFox/container-desktop.git
JerryFox
container-desktop
container-desktop
main

搜索帮助