From 85634cfc6e45bcad5a5789b87b034664d8aea9d2 Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Wed, 29 Nov 2023 19:33:17 +0100 Subject: [PATCH 1/3] 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) { %> + + + + <% } %>
From fc535faa9a6e6e9bf0add247361056e2953055fd Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Wed, 29 Nov 2023 20:05:12 +0100 Subject: [PATCH 2/3] adjusting comment --- web/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/index.html b/web/index.html index 698259150f3f..a7630b1a2cdc 100644 --- a/web/index.html +++ b/web/index.html @@ -135,7 +135,7 @@ <% if (htmlWebpackPlugin.options.isProduction) { %> - + <% } %> From 8a0e457222c0f6d503a0a36304dbc832ff9c6f16 Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Wed, 29 Nov 2023 20:08:09 +0100 Subject: [PATCH 3/3] Update config/webpack/webpack.common.js Co-authored-by: Rory Abraham <47436092+roryabraham@users.noreply.github.com> --- config/webpack/webpack.common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/webpack/webpack.common.js b/config/webpack/webpack.common.js index 8f16c55490b5..8c74ebfd1686 100644 --- a/config/webpack/webpack.common.js +++ b/config/webpack/webpack.common.js @@ -67,7 +67,7 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({ filename: 'index.html', splashLogo: fs.readFileSync(path.resolve(__dirname, `../../assets/images/new-expensify${mapEnvToLogoSuffix(envFile)}.svg`), 'utf-8'), isWeb: platform === 'web', - isProduction: platform === '.env.production', + isProduction: envFile === '.env.production', isStaging: envFile === '.env.staging', }), new FontPreloadPlugin({