cal.pub0.org/packages/embeds/embed-snippet/vite.config.js

20 lines
414 B
JavaScript

import viteBaseConfig from "../vite.config";
const path = require("path");
const { defineConfig } = require("vite");
module.exports = defineConfig({
...viteBaseConfig,
build: {
lib: {
entry: path.resolve(__dirname, "src", "index.ts"),
name: "snippet",
fileName: (format) => `snippet.${format}.js`,
},
minify: "terser",
terserOptions: {
compress: true,
},
},
});