Novage / p2p-media-loader

An open-source engine for P2P streaming of live and on demand video directly in a web browser HTML page
https://novage.com.ua/p2p-media-loader/demo.html
Apache License 2.0
1.45k stars 314 forks source link

Conditional bundle export in p2p-media-loader-core #443

Closed mrlika closed 5 days ago

mrlika commented 5 days ago

Description

Use p2pml:core-as-bundle custom conditional export to export p2p-media-loaer-core as a bundle with all the its dependencies included.

It may help those who don't want to mess with bittorent-tracker/client dependencies and node-polyfills.

Examples

Vite:

export default defineConfig({
  plugins: [
    //nodePolyfills(),
    react(),
  ],
  resolve: {
    conditions: ['p2pml:core-as-bundle'],
  },
});

Node.js, webpack, Rollup: https://webpack.js.org/guides/package-exports/#conditions-custom

esbuild: https://esbuild.github.io/api/#conditions

Comments

Additionally, all the dependencies are updated to the latest ones.