2022-03-31 08:45:47 +00:00
|
|
|
require("dotenv").config({ path: "../../../.env" });
|
|
|
|
|
|
|
|
const path = require("path");
|
|
|
|
const { defineConfig } = require("vite");
|
|
|
|
module.exports = defineConfig({
|
|
|
|
envPrefix: "NEXT_PUBLIC_",
|
|
|
|
build: {
|
2022-04-08 05:33:24 +00:00
|
|
|
minify: "terser",
|
|
|
|
terserOptions: {
|
|
|
|
format: {
|
|
|
|
comments: false,
|
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:45:47 +00:00
|
|
|
lib: {
|
|
|
|
entry: path.resolve(__dirname, "src/embed.ts"),
|
|
|
|
name: "embed",
|
|
|
|
fileName: (format) => `embed.${format}.js`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|