30 lines
647 B
TypeScript
30 lines
647 B
TypeScript
import { defineConfig } from "vite";
|
|
import preact from "@preact/preset-vite";
|
|
import { resolve } from "path";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [preact()],
|
|
resolve: {
|
|
alias: {
|
|
"@": resolve(__dirname, "src"),
|
|
},
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: resolve(__dirname, "src/main.tsx"),
|
|
name: "tarteauxmyrtilles",
|
|
fileName: (format) => `tarteauxmyrtilles.${format}.js`,
|
|
formats: ["es", "iife"],
|
|
},
|
|
// rollupOptions: {
|
|
// external: ["preact"],
|
|
// output: {
|
|
// globals: {
|
|
// preact: "preact",
|
|
// },
|
|
// },
|
|
// },
|
|
},
|
|
});
|