ci: corrected building and bundeling with tsc vite
This commit is contained in:
23
vite.config.ts
Normal file
23
vite.config.ts
Normal 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",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user