diff --git a/package.json b/package.json
index 3c2e7af6a..b076c3ea2 100644
--- a/package.json
+++ b/package.json
@@ -80,7 +80,9 @@
"html-webpack-plugin": "^5.5.3",
"prettier": "^2.8.1",
"typescript": "^5.0.2",
+ "uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^5.88.1",
+ "webpack-bundle-analyzer": "^4.10.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.7.3"
diff --git a/src/App.tsx b/src/App.tsx
new file mode 100644
index 000000000..8f2f228c1
--- /dev/null
+++ b/src/App.tsx
@@ -0,0 +1,27 @@
+import React from "react"
+import { Web3OnboardProvider } from "@web3-onboard/react"
+import { Provider } from "react-redux"
+import web3Onboard from "shared/utils/web3Onboard"
+import { PostHogProvider } from "posthog-js/react"
+import { BrowserRouter as Router } from "react-router-dom"
+import GlobalStyles from "ui/GlobalStyles"
+import { POSTHOG_API_KEY, POSTHOG_API_OPTIONS } from "config/posthog"
+import Dapp from "ui/DApp/Dapp"
+import reduxStore from "./redux-state"
+
+export default function App() {
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+
+ >
+ )
+}
diff --git a/src/config/posthog.ts b/src/config/posthog.ts
new file mode 100644
index 000000000..15961dd61
--- /dev/null
+++ b/src/config/posthog.ts
@@ -0,0 +1,18 @@
+import { PostHogConfig } from "posthog-js"
+
+export const { POSTHOG_API_KEY } = process.env
+
+export const POSTHOG_API_OPTIONS: Partial = {
+ persistence: "localStorage",
+ autocapture: false,
+ capture_pageview: false,
+ disable_session_recording: true,
+ sanitize_properties(properties) {
+ return {
+ ...properties,
+ // The extension has set an expectation that the lib is set to
+ // the analytics env.
+ $lib: process.env.ANALYTICS_ENV,
+ }
+ },
+}
diff --git a/src/env.d.ts b/src/env.d.ts
index 44ba2fe88..2d88c6f06 100644
--- a/src/env.d.ts
+++ b/src/env.d.ts
@@ -30,6 +30,9 @@ declare module "*.mp4" {
export = value
}
+declare module "webpack-bundle-analyzer"
+declare module "uglifyjs-webpack-plugin"
+
declare namespace NodeJS {
interface ProcessEnv {
NODE_ENV: "production" | "development" | "test"
diff --git a/src/index.tsx b/src/index.tsx
index da7313411..da0b8d8a3 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,52 +1,16 @@
import React from "react"
import ReactDOM from "react-dom/client"
-import { Web3OnboardProvider } from "@web3-onboard/react"
-import { Provider } from "react-redux"
-import web3Onboard from "shared/utils/web3Onboard"
-import { PostHogProvider } from "posthog-js/react"
-import { BrowserRouter as Router } from "react-router-dom"
-import DApp from "ui/DApps"
-import reduxStore from "./redux-state"
-
-function DAppProviders() {
- return (
-
-
-
-
-
-
-
-
-
- )
-}
+import App from "./App"
const root = document.getElementById("root")
if (root) {
if (process.env.SKIP_REACT_STRICT_MODE === "true") {
- ReactDOM.createRoot(root).render()
+ ReactDOM.createRoot(root).render()
} else {
ReactDOM.createRoot(root).render(
-
+
)
}
diff --git a/src/public/index.html b/src/public/index.html
index a3e183d07..1b89a0be9 100644
--- a/src/public/index.html
+++ b/src/public/index.html
@@ -4,6 +4,14 @@
Subscape
+
+
+
+
-
-
-
-