ci: corrected building and bundeling with tsc vite

This commit is contained in:
2026-04-23 02:01:53 +03:30
parent 8278e313e5
commit 1a3ed6816c
4 changed files with 26 additions and 2 deletions

23
vite.config.ts Normal file
View File

@@ -0,0 +1,23 @@
import { defineConfig } from "vite";
import { resolve } from "path";
export default defineConfig({
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "VideoPlayer",
fileName: (format) => `video-player.${format}.js`,
formats: ["es", "umd"],
},
outDir: "bundle",
emptyOutDir: true,
rollupOptions: {
external: ["hls.js"],
output: {
globals: {
"hls.js": "Hls",
},
},
},
},
});