low-code/farm.config.ts

51 lines
1.2 KiB
TypeScript

import { defineConfig } from "@farmfe/core";
import vue from "@vitejs/plugin-vue";
import vueJsx from "@vitejs/plugin-vue-jsx";
// import { fileURLToPath, URL } from "node:url";
// import yargsParser from "yargs-parser";
// const argv = yargsParser(process.argv.slice(2));
console.log(process.env.DEV_ENV);
// let base: string;
// switch (argv.mode) {
// case "staging":
// case "test":
// base = "https://custom-chart.shiyue.com/";
// break;
// case "production":
// base = "https://custom-chart.shiyuegame.com/";
// break;
// default:
// base = "http://localhost:8080/";
// }
// if (process.env.DEV_ENV === "development") {
// base = "http://localhost:8080/";
// }
export default defineConfig({
// compilation: {
// output: {
// path: "./dist",
// publicPath: base,
// filename: "[name]-ycode-[hash:8].[ext]",
// },
// sourcemap: false,
// },
vitePlugins: [vue(), vueJsx()],
// resolve: {
// alias: {
// "@": fileURLToPath(new URL("./src", import.meta.url)),
// },
// },
// define: {
// _BASE_HOST_: `'${base}'`,
// },
// server: {
// hmr: true,
// host: "0.0.0.0",
// port: 8080,
// },
});