shareon/vite.config.js

25 lines
504 B
JavaScript
Raw Permalink Normal View History

2022-02-10 15:26:11 -05:00
import { defineConfig } from "vite";
2022-02-10 16:21:09 -05:00
import * as path from "node:path";
import package_ from "./package.json";
2022-02-10 15:26:11 -05:00
export default defineConfig({
esbuild: {
minify: true,
},
build: {
sourcemap: true,
target: "esnext",
minify: "terser",
lib: {
entry: path.resolve("./src/index.js"),
name: "Shareon",
formats: ["es", "umd", "iife"],
},
2022-02-10 15:44:35 -05:00
rollupOptions: {
output: {
banner: `/*! ${package_.name} v${package_.version} */`,
2022-02-10 15:44:35 -05:00
},
},
2022-02-10 15:26:11 -05:00
},
});