Add convenience functions, update Docker setup, and integrate Webpack for building WebRTC internals exporter (#3)
All checks were successful
Build and Push Docker Image / build (push) Successful in 12m31s
All checks were successful
Build and Push Docker Image / build (push) Successful in 12m31s
Reviewed-on: #3 Co-authored-by: Mirko Milovanovic <mir_ko@me.com> Co-committed-by: Mirko Milovanovic <mir_ko@me.com>
This commit is contained in:
34
webrtc-internals-exporter/webpack/webpack.config.js
Normal file
34
webrtc-internals-exporter/webpack/webpack.config.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const path = require('path');
|
||||
const { EnvironmentPlugin } = require('webpack');
|
||||
const envPath = path.resolve(__dirname, '../../.env');
|
||||
const envConfig = require('dotenv').config({ path: envPath }).parsed;
|
||||
|
||||
module.exports = (env) => {
|
||||
const url = env.URL || 'http://localhost';
|
||||
|
||||
return {
|
||||
entry: '../background.js',
|
||||
target: 'web',
|
||||
mode: 'production',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js?$/,
|
||||
use: 'babel-loader',
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: { extensions: ['.tsx', '.ts', '.js'] },
|
||||
output: {
|
||||
filename: 'background.bundle.js',
|
||||
path: path.resolve(__dirname, '../'),
|
||||
publicPath: '',
|
||||
},
|
||||
plugins: [
|
||||
new EnvironmentPlugin({
|
||||
WEBRTC_INTERNALS_EXPORTER_URL: envConfig.WEBRTC_INTERNALS_EXPORTER_URL || url
|
||||
}),
|
||||
],
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user