From 85634cfc6e45bcad5a5789b87b034664d8aea9d2 Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Wed, 29 Nov 2023 19:33:17 +0100 Subject: [PATCH] adding flags for google GTM --- config/webpack/webpack.common.js | 3 ++- web/index.html | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/config/webpack/webpack.common.js b/config/webpack/webpack.common.js index 22d035368c42..8f16c55490b5 100644 --- a/config/webpack/webpack.common.js +++ b/config/webpack/webpack.common.js @@ -66,7 +66,8 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({ template: 'web/index.html', filename: 'index.html', splashLogo: fs.readFileSync(path.resolve(__dirname, `../../assets/images/new-expensify${mapEnvToLogoSuffix(envFile)}.svg`), 'utf-8'), - usePolyfillIO: platform === 'web', + isWeb: platform === 'web', + isProduction: platform === '.env.production', isStaging: envFile === '.env.staging', }), new FontPreloadPlugin({ diff --git a/web/index.html b/web/index.html index 6e5d0cd3c5d6..698259150f3f 100644 --- a/web/index.html +++ b/web/index.html @@ -131,13 +131,23 @@ - <% if (htmlWebpackPlugin.options.usePolyfillIO) { %> + <% if (htmlWebpackPlugin.options.isWeb) { %> + <% if (htmlWebpackPlugin.options.isProduction) { %> + + + + <% } %> <% } %> + <% if (htmlWebpackPlugin.options.isWeb && htmlWebpackPlugin.options.isProduction) { %> + + + + <% } %>