diff --git a/webpack.common.js b/webpack.common.js index c6602f654..6802ee965 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -5,21 +5,20 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const CopyPlugin = require("copy-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const TerserPlugin = require("terser-webpack-plugin"); -const BundleAnalyzerPlugin = - require("webpack-bundle-analyzer").BundleAnalyzerPlugin; +const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin; const { sentryWebpackPlugin } = require("@sentry/webpack-plugin"); const sdkEnv = process.env.sdkEnv; const envSdkUrl = process.env.envSdkUrl; const envBackendUrl = process.env.envBackendUrl; +const envLoggingUrl = process.env.envLoggingUrl; //git rev-parse --abbrev-ref HEAD let repoVersion = require("./package.json").version; let majorVersion = "v" + repoVersion.split(".")[0]; let repoName = require("./package.json").name; -let repoPublicPath = - sdkEnv === "local" ? "" : `/${repoVersion}/${majorVersion}`; +let repoPublicPath = sdkEnv === "local" ? "" : `/${repoVersion}/${majorVersion}`; let sdkUrl; @@ -64,10 +63,15 @@ if (envBackendUrl === undefined) { confirmEndPoint = envBackendUrl; } -let logEndpoint = - sdkEnv === "prod" - ? "https://api.hyperswitch.io/logs/sdk" - : "https://sandbox.hyperswitch.io/logs/sdk"; +let logEndpoint; +if (envLoggingUrl === undefined) { + logEndpoint = + sdkEnv === "prod" + ? "https://api.hyperswitch.io/logs/sdk" + : "https://sandbox.hyperswitch.io/logs/sdk"; +} else { + logEndpoint = envLoggingUrl; +} // Set this to true to enable logging let enableLogging = true; diff --git a/webpack.dev.js b/webpack.dev.js index 8801754f3..d702a8003 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -16,6 +16,7 @@ let backendEndPoint = let devServer = { contentBase: path.join(__dirname, "dist"), hot: true, + host: "0.0.0.0", port: 9050, historyApiFallback: true, proxy: {