2024-02-13 01:41:48 +01:00
|
|
|
const Dotenv = require("dotenv");
|
|
|
|
import liveReload from "vite-plugin-live-reload";
|
2024-02-12 21:44:41 +01:00
|
|
|
|
|
|
|
Dotenv.config();
|
|
|
|
|
2024-02-13 01:41:48 +01:00
|
|
|
const ASSET_URL = process.env.ASSET_URL || "http://localhost:3000";
|
|
|
|
const VITE_INPUT = process.env.VITE_INPUT || "resources/js/app.js";
|
2024-02-12 21:44:41 +01:00
|
|
|
|
2024-02-13 01:41:48 +01:00
|
|
|
export default ({ command }) => {
|
|
|
|
return {
|
|
|
|
base: command === "serve" ? "/themes/vite-tailwind" : "/build/",
|
|
|
|
/*base: `${ASSET_URL}`,*/
|
|
|
|
publicDir: "fake_dir_so_nothing_gets_copied",
|
|
|
|
build: {
|
|
|
|
manifest: true,
|
|
|
|
outDir: "build",
|
|
|
|
rollupOptions: {
|
|
|
|
input: `${VITE_INPUT}`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
server: {
|
|
|
|
strictPort: true,
|
|
|
|
port: 3000,
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: [".js", ".mjs"],
|
|
|
|
},
|
|
|
|
plugins: [liveReload("./**/*.htm")],
|
|
|
|
};
|
2024-02-12 21:44:41 +01:00
|
|
|
};
|