Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: bundling issue with vite #56

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modular-player/webpack/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ <h2>Your videos play everywhere with low startup delay, no buffering and in high
</div>
</div>
</div>
<script type="text/javascript" src="./dist/bundle.js"></script>
<script type='module' src='/src/index.js'></script>
</body>
</html>
6 changes: 6 additions & 0 deletions modular-player/webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"scripts": {
"build": "vite build",
"serve": "vite preview",
"dev": "vite"
},
"devDependencies": {
"bitmovin-player": "^8.0.1",
"css-loader": "^1.0.0",
"style-loader": "^0.23.0",
"vite": "^2.5.7",
"webpack": "^4.17.1",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.6"
Expand Down
7 changes: 7 additions & 0 deletions modular-player/webpack/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import SubtitlesModule from 'bitmovin-player/modules/bitmovinplayer-subtitles';
import SubtitlesCEA608Module from 'bitmovin-player/modules/bitmovinplayer-subtitles-cea608';
import PolyfillModule from 'bitmovin-player/modules/bitmovinplayer-polyfill';
import StyleModule from 'bitmovin-player/modules/bitmovinplayer-style';
import XMLModule from 'bitmovin-player/modules/bitmovinplayer-xml';
import DashModule from 'bitmovin-player/modules/bitmovinplayer-dash';
import MP4ContainerModule from 'bitmovin-player/modules/bitmovinplayer-container-mp4';


import { UIFactory } from 'bitmovin-player/bitmovinplayer-ui';
import 'bitmovin-player/bitmovinplayer-ui.css';
Expand All @@ -17,10 +21,13 @@ Player.addModule(MseRendererModule);
Player.addModule(HlsModule);
Player.addModule(AbrModule);
Player.addModule(ContainerTSModule);
Player.addModule(MP4ContainerModule);
Player.addModule(SubtitlesModule);
Player.addModule(SubtitlesCEA608Module);
Player.addModule(PolyfillModule);
Player.addModule(StyleModule);
Player.addModule(XMLModule);
Player.addModule(DashModule);

const conf = {
key: 'YOUR KEY HERE',
Expand Down
10 changes: 10 additions & 0 deletions modular-player/webpack/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig, PluginOption, UserConfigExport } from 'vite';


// https://vitejs.dev/config/


export default defineConfig({
plugins: [],
base: '',
});