From bb7052f8e97543f17844e061fcdabde890d670c3 Mon Sep 17 00:00:00 2001 From: Anxo Rodriguez Date: Tue, 17 Oct 2023 18:24:38 +0100 Subject: [PATCH] feat: deploy to IPFS --- apps/cowswap-frontend/vite.config.ts | 1 + package.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/cowswap-frontend/vite.config.ts b/apps/cowswap-frontend/vite.config.ts index ba713e5870..08dbec0511 100644 --- a/apps/cowswap-frontend/vite.config.ts +++ b/apps/cowswap-frontend/vite.config.ts @@ -70,6 +70,7 @@ export default defineConfig(({ mode }) => { } return { + base: './', define: { ...getReactProcessEnv(mode), }, diff --git a/package.json b/package.json index 126acbaf31..afa8b1ede3 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,9 @@ }, "scripts": { "start": "nx run cowswap-frontend:serve", + "build": "cross-env NODE_OPTIONS=--max-old-space-size=32768 nx build cowswap-frontend", + "ipfs:build": "PUBLIC_URL=\".\" yarn build", + "ipfs:publish": "npx ipfs-deploy build -p pinata -O", "preview": "cross-env NODE_OPTIONS=--max-old-space-size=32768 nx run cowswap-frontend:preview", "cosmos:export": "cross-env NODE_OPTIONS=--max-old-space-size=32768 nx run cowswap-frontend:cosmos:export", "cosmos": "nx run cowswap-frontend:cosmos:run", @@ -17,7 +20,6 @@ "e2e": "nx run-many -t e2e", "lint": "nx run-many -t lint", "prebuild": "nx run cowswap-frontend:i18n", - "build": "cross-env NODE_OPTIONS=--max-old-space-size=32768 nx build cowswap-frontend", "prepare": "husky install", "postinstall": "yarn run patch-package", "analyze-build": "cross-env ANALYZE_BUNDLE=true ANALYZE_BUNDLE_TEMPLATE=sunburst yarn build"