2022-02-10 15:26:11 -05:00
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import * as path from "path";
|
2022-02-10 15:44:35 -05:00
|
|
|
import pkg 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: `/*! ${pkg.name} v${pkg.version} */`,
|
|
|
|
},
|
|
|
|
},
|
2022-02-10 15:26:11 -05:00
|
|
|
},
|
|
|
|
});
|