Skip to content

Commit

Permalink
Try chrome76 config for TV
Browse files Browse the repository at this point in the history
  • Loading branch information
enjikaka committed May 8, 2024
1 parent 0538ab8 commit 0ec59bd
Show file tree
Hide file tree
Showing 3 changed files with 199 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/player/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"wtr": "web-test-runner",
"test": "bash ./scripts/test.sh",
"prepare": "vite build",
"build": "vite build",
"build": "vite build && vite build -c vite-tv.config.ts",
"clean": "rm -rf coverage dist .eslintcache",
"dev": "vite --debug --cors -c=./vite.config.ts",
"lint": "eslint . --cache --cache-strategy content",
Expand Down
34 changes: 34 additions & 0 deletions packages/player/vite-tv.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { type PluginOption } from 'vite';
import dts from 'vite-plugin-dts';
import topLevelAwait from 'vite-plugin-top-level-await';
import { defineConfig } from 'vitest/config';

export default defineConfig({
build: {
lib: {
entry: 'src/index.ts',
fileName: 'index',
formats: ['es'],
},
outDir: 'dist/tv',
target: 'chrome76',
},
plugins: [
topLevelAwait(),
dts({
rollupTypes: true,
tsconfigPath: 'tsconfig.build.json',
}) as PluginOption,
],
server: {
open: '/demo/index.html',
},
test: {
coverage: {
reporter: process.env.CI ? ['json', 'json-summary'] : ['html'],
},
globals: true,
restoreMocks: true,
unstubGlobals: true,
},
});
164 changes: 164 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0ec59bd

Please sign in to comment.