diff --git a/.github/workflows/aws-hosting-merge-deploy-newm-mobile-wallet-connector.yml b/.github/workflows/aws-hosting-merge-deploy-newm-mobile-wallet-connector.yml index b2f93f4c..6ad0931d 100644 --- a/.github/workflows/aws-hosting-merge-deploy-newm-mobile-wallet-connector.yml +++ b/.github/workflows/aws-hosting-merge-deploy-newm-mobile-wallet-connector.yml @@ -46,5 +46,4 @@ jobs: - name: Deploy to Lambda Function run: | npm install --prefix .github/workflows/cdk - sed -i 's|const nextConfig = .*|const nextConfig = { basePath: "/wallet-connect", |' apps/mobile-wallet-connector/next.config.js APPNAME=mobile-wallet-connector APPID=MobileWalletConnector QUALIFIER=Garage NEXT_PUBLIC_RECAPTCHA_SITE_KEY_STAGING=${{ secrets.RECAPTCHA_SITE_KEY_STAGING }} npm run --prefix .github/workflows/cdk cdk:deploy deploy -- --require-approval never diff --git a/apps/mobile-wallet-connector/next.config.js b/apps/mobile-wallet-connector/next.config.js index cd15da23..f8fa98d3 100644 --- a/apps/mobile-wallet-connector/next.config.js +++ b/apps/mobile-wallet-connector/next.config.js @@ -7,21 +7,30 @@ const { composePlugins, withNx } = require("@nx/next"); * @type {import('@nx/next/plugins/with-nx').WithNxOptions} **/ const nextConfig = { + async rewrites() { + return [ + { + source: "/wallet-connect/:path*", + destination: "/:path*" + } + ]; + }, + nx: { // Set this to true if you would like to to use SVGR // See: https://github.com/gregberge/svgr - svgr: false, + svgr: false }, compiler: { // For other options, see https://styled-components.com/docs/tooling#babel-plugin - styledComponents: true, - }, + styledComponents: true + } }; const plugins = [ // Add more Next.js plugins to this list if needed. - withNx, + withNx ]; module.exports = composePlugins(...plugins)(nextConfig);