diff --git a/examples/webRtcTcpDetectEvent/webpack.common.js b/examples/webRtcTcpDetectEvent/webpack.common.js index d8d4bb3c..b3a46e65 100644 --- a/examples/webRtcTcpDetectEvent/webpack.common.js +++ b/examples/webRtcTcpDetectEvent/webpack.common.js @@ -8,9 +8,6 @@ module.exports = { index: './src/index.ts', }, plugins: [ - new webpack.DefinePlugin({ - WEBSOCKET_URL: JSON.stringify((process.env.WEBSOCKET_URL !== undefined) ? process.env.WEBSOCKET_URL : '') - }), new HtmlWebpackPlugin({ title: 'Scalable Pixel Streaming Frontend', template: './src/index.html', diff --git a/examples/webRtcTcpDetectEvent/webpack.dev.js b/examples/webRtcTcpDetectEvent/webpack.dev.js index e1d10636..414a90fb 100644 --- a/examples/webRtcTcpDetectEvent/webpack.dev.js +++ b/examples/webRtcTcpDetectEvent/webpack.dev.js @@ -1,8 +1,14 @@ const { merge } = require('webpack-merge'); const common = require('./webpack.common.js'); const path = require('path'); +const webpack = require('webpack'); module.exports = merge(common, { mode: 'development', devtool: 'source-map', + plugins: [ + new webpack.DefinePlugin({ + WEBSOCKET_URL: JSON.stringify((process.env.WEBSOCKET_URL !== undefined) ? process.env.WEBSOCKET_URL : '') + }), + ] }); \ No newline at end of file diff --git a/examples/webRtcTcpDetectEvent/webpack.prod.js b/examples/webRtcTcpDetectEvent/webpack.prod.js index 132f8a8b..4c937e3d 100644 --- a/examples/webRtcTcpDetectEvent/webpack.prod.js +++ b/examples/webRtcTcpDetectEvent/webpack.prod.js @@ -1,14 +1,20 @@ const { merge } = require('webpack-merge'); const common = require('./webpack.common.js'); +const webpack = require('webpack'); module.exports = merge(common, { - mode: 'production', - optimization: { - usedExports: true, - minimize: true - }, - stats: 'errors-only', - performance: { - hints: false - } + mode: 'production', + optimization: { + usedExports: true, + minimize: true + }, + stats: 'errors-only', + performance: { + hints: false + }, + plugins: [ + new webpack.DefinePlugin({ + WEBSOCKET_URL: undefined + }), + ] });