UNPKG

socket-rtc

Version:

SocketRTC is a library that combines WebRTC and WebSocket to facilitate peer-to-peer communication. It allows for real-time communication between browsers and Node.js environments using WebRTC for direct peer-to-peer connections and WebSocket for signalin

42 lines (40 loc) 972 B
const path = require('path'); const webpack = require('webpack'); module.exports = { entry: './src/socketrtc.js', mode: 'development', output: { path: path.resolve(__dirname, 'dist'), filename: 'socketrtc.js', clean: true, library: 'SocketRTC', // name of the library libraryTarget: 'umd' // module type }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: ['@babel/preset-env'] } }, }, ], }, resolve: { fallback: { "wrtc": false, }, alias: { "socket.io": false } }, plugins: [ new webpack.ProvidePlugin({ process: 'process/browser', }) ] }