29 lines
574 B
JavaScript
29 lines
574 B
JavaScript
import { defineConfig } from "vite";
|
|
import { generateClonesPreview } from "./build/generate-preview.js";
|
|
|
|
export default defineConfig(({ command }) => {
|
|
return {
|
|
server: {
|
|
host: true
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
main: "./index.html",
|
|
vixiclones: "./vixiclones.html"
|
|
}
|
|
}
|
|
},
|
|
plugins: [
|
|
{
|
|
name: "generate-clones-preview",
|
|
async closeBundle() {
|
|
if (command === "build") {
|
|
await generateClonesPreview();
|
|
}
|
|
}
|
|
}
|
|
]
|
|
};
|
|
});
|