chore: unify build output for both npm and bundle
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { defineConfig } from "vite";
|
||||
import { resolve } from "path";
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
lib: {
|
||||
entry: resolve(__dirname, "src/index.ts"),
|
||||
entry: "src/index.ts",
|
||||
name: "VP",
|
||||
fileName: (format) => `video-player.${format}.js`,
|
||||
formats: ["es", "umd"],
|
||||
formats: ["es", "cjs", "umd"],
|
||||
},
|
||||
outDir: "bundle",
|
||||
emptyOutDir: true,
|
||||
minify: "esbuild",
|
||||
outDir: "dist",
|
||||
emptyOutDir: false,
|
||||
rollupOptions: {
|
||||
external: ["hls.js"],
|
||||
output: {
|
||||
|
||||
Reference in New Issue
Block a user