From d19c1421035fc0b18cf1742244f4ee0c88aa6a49 Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Tue, 14 May 2024 13:58:12 +0400 Subject: [PATCH 1/4] fix: deleting third party proxy and partytown --- themes/gatsby-theme-deriv/gatsby-node.js | 4 ---- themes/gatsby-theme-deriv/package.json | 1 - 2 files changed, 5 deletions(-) diff --git a/themes/gatsby-theme-deriv/gatsby-node.js b/themes/gatsby-theme-deriv/gatsby-node.js index 308d509fc57..4c563623f05 100644 --- a/themes/gatsby-theme-deriv/gatsby-node.js +++ b/themes/gatsby-theme-deriv/gatsby-node.js @@ -2,7 +2,6 @@ const language_config = require(`./i18n-config.js`) const language_config_en = require(`./i18n-config-en.js`) const path = require('path') -const { copyLibFiles } = require('@builder.io/partytown/utils') const { exec } = require('child_process') const StylelintPlugin = require('stylelint-webpack-plugin') const TerserPlugin = require('terser-webpack-plugin') @@ -33,9 +32,6 @@ const fetchTrustpilotData = () => { }) } -exports.onPreBuild = async () => { - await copyLibFiles(path.join(__dirname, 'static', '~partytown')) -} exports.onPreInit = () => { // Update truspilot.json file with latest data fetchTrustpilotData() diff --git a/themes/gatsby-theme-deriv/package.json b/themes/gatsby-theme-deriv/package.json index 21e7f8b7087..3fd547dc842 100644 --- a/themes/gatsby-theme-deriv/package.json +++ b/themes/gatsby-theme-deriv/package.json @@ -17,7 +17,6 @@ "license": "ISC", "dependencies": { "@artsy/fresnel": "^6.2.1", - "@builder.io/partytown": "^0.8.1", "@deriv-com/analytics": "^1.5.0", "@deriv-com/blocks": "^0.118.0", "@deriv-com/components": "^0.59.0", From 4cd9cea83acebfa1bd6fd2f259046f0a808b2051 Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Tue, 14 May 2024 13:59:14 +0400 Subject: [PATCH 2/4] fix: removal of builderpartytown --- themes/gatsby-theme-deriv/gatsby-ssr.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/themes/gatsby-theme-deriv/gatsby-ssr.js b/themes/gatsby-theme-deriv/gatsby-ssr.js index d8f34f3a386..d54b9d5f501 100644 --- a/themes/gatsby-theme-deriv/gatsby-ssr.js +++ b/themes/gatsby-theme-deriv/gatsby-ssr.js @@ -1,5 +1,4 @@ import React from 'react' -import { Partytown } from '@builder.io/partytown/react' import { WrapPagesWithLocaleContext } from './src/components/localization' import './src/components/localization/config' import GlobalProvider from './src/store/global-provider' @@ -17,25 +16,6 @@ export const onRenderBody = ({ setHeadComponents }) => { setHeadComponents([ , , - // Partytown setup - , - From 13cc34ed2676dd3de836c549db8e1aaef1ed4d2b Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Tue, 14 May 2024 14:19:06 +0400 Subject: [PATCH 4/4] fix: remove type partytown --- package.json | 2 -- themes/gatsby-theme-deriv/gatsby-config.js | 6 ------ 2 files changed, 8 deletions(-) diff --git a/package.json b/package.json index 086f6777716..2c8d0248bf2 100644 --- a/package.json +++ b/package.json @@ -83,8 +83,6 @@ "build:row": "npm run build --workspace @deriv/row && node scripts/copy-htaccess.js row", "build:eu": "npm run build --workspace @deriv/eu && node scripts/copy-htaccess.js eu", "update:deriv-com-libs": "npm i @deriv-com/blocks@latest @deriv-com/components@latest @deriv-com/hooks@latest @deriv-com/providers@latest --workspace gatsby-theme-deriv", - "partytown:row": "partytown copylib sites/row/public/~partytown", - "partytown:eu": "partytown copylib sites/eu/public/~partytown", "develop:row": "npm run develop --workspace @deriv/row", "clean:row": "npm run clean --workspace @deriv/row", "develop:eu": "npm run develop --workspace @deriv/eu", diff --git a/themes/gatsby-theme-deriv/gatsby-config.js b/themes/gatsby-theme-deriv/gatsby-config.js index 523da606e69..308a379eeb5 100644 --- a/themes/gatsby-theme-deriv/gatsby-config.js +++ b/themes/gatsby-theme-deriv/gatsby-config.js @@ -44,12 +44,6 @@ module.exports = { author: 'Deriv.com', siteUrl: site_url, }, - partytownProxiedURLs: [ - `https://assets.customer.io/assets/track-eu.js`, - `https://assets.customer.io/assets/track.js`, - `https://static.deriv.com/scripts/cookie.js`, - `https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js`, - ], plugins: [ 'gatsby-plugin-postcss', {