From 0bf7972ff17201fc45fae568e984b339ff985298 Mon Sep 17 00:00:00 2001 From: Roy Scheeren Date: Wed, 15 May 2024 09:54:09 +0200 Subject: [PATCH] fix(siwt.xyz): static output settings (#58) * Update static output settings to next 14 -------------------------------------------- Signed-off-by: Roy Scheeren --- .github/workflows/deploy-demo.yml | 1 - .gitignore | 1 + nx.json | 23 +++++++++++++++++++++++ packages/react/tsconfig.json | 1 - packages/siwt.xyz/next.config.js | 2 ++ packages/siwt.xyz/project.json | 20 -------------------- 6 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 57bb698..67359ce 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -57,7 +57,6 @@ jobs: aws-region: 'eu-central-1' - run: npx nx run-many --target=build --parallel=3 --exclude=acq,core,discord,discord-bot-ui,react,sdk,docs.siwt.xyz,siwt.xyz-e2e,smart-contracts --skip-nx-cache - run: npx nx run-many --target=build-server --parallel=3 --exclude=acq,core,discord,discord-bot-ui,react,sdk,docs.siwt.xyz,siwt.xyz-e2e,smart-contracts --skip-nx-cache - - run: npx nx run-many --target=export --exclude=acq,core,discord,discord-bot-ui,react,sdk,docs.siwt.xyz,siwt.xyz-e2e,smart-contracts --skip-nx-cache - name: Setup staging env file if: github.ref == 'refs/heads/develop' diff --git a/.gitignore b/.gitignore index d442f10..5fd04e9 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ Thumbs.db # Next.js .next +out # Docusaurus .docusaurus diff --git a/nx.json b/nx.json index e8cdcb9..8331a83 100644 --- a/nx.json +++ b/nx.json @@ -65,5 +65,28 @@ } } }, + "plugins": [ + { + "plugin": "@nx/next/plugin", + "options": { + "startTargetName": "start", + "buildTargetName": "build", + "devTargetName": "dev", + "serveStaticTargetName": "serve-static" + } + }, + { + "plugin": "@nx/jest/plugin", + "options": { + "targetName": "test" + } + }, + { + "plugin": "@nx/eslint/plugin", + "options": { + "targetName": "lint" + } + } + ], "neverConnectToCloud": true } diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json index bab74ff..38524a0 100644 --- a/packages/react/tsconfig.json +++ b/packages/react/tsconfig.json @@ -4,7 +4,6 @@ "allowJs": false, "esModuleInterop": false, "allowSyntheticDefaultImports": true, - "strict": true, "types": ["vite/client"] }, "files": [], diff --git a/packages/siwt.xyz/next.config.js b/packages/siwt.xyz/next.config.js index 0b612be..92fac91 100644 --- a/packages/siwt.xyz/next.config.js +++ b/packages/siwt.xyz/next.config.js @@ -7,6 +7,8 @@ const { withNx } = require('@nx/next/plugins/with-nx') * @type {import('@nx/next/plugins/with-nx').WithNxOptions} **/ const nextConfig = { + output: 'export', + distDir: '../../dist/packages/siwt.xyz', nx: { // Set this to true if you would like to to use SVGR // See: https://github.com/gregberge/svgr diff --git a/packages/siwt.xyz/project.json b/packages/siwt.xyz/project.json index afc5c22..dbe3f9c 100644 --- a/packages/siwt.xyz/project.json +++ b/packages/siwt.xyz/project.json @@ -4,20 +4,6 @@ "sourceRoot": "packages/siwt.xyz", "projectType": "application", "targets": { - "build": { - "executor": "@nx/next:build", - "outputs": ["{options.outputPath}"], - "defaultConfiguration": "production", - "options": { - "outputPath": "dist/packages/siwt.xyz" - }, - "configurations": { - "development": { - "outputPath": "packages/siwt.xyz" - }, - "production": {} - } - }, "build-server": { "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], @@ -56,12 +42,6 @@ } } }, - "export": { - "executor": "@nx/next:export", - "options": { - "buildTarget": "siwt.xyz:build:production" - } - }, "test": { "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],