From 5da2e3a143eb53493ec6a77f8abba41eb3ca5d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=AA=20Huy=20Giang?= Date: Sat, 29 Jun 2024 11:16:43 +0700 Subject: [PATCH 1/3] feat(nx-cloud): setup nx cloud workspace This commit set up Nx Cloud for your Nx workspace enabling distributed caching and GitHub integration for fast CI and improved Developer Experience. You can access your Nx Cloud workspace by going to https://cloud.nx.app/orgs/667f8a8c7e7db61d895c7fbc/workspaces/667f8aa9e8e16f575ee82d37 **Note:** This commit attempts to maintain formatting of the nx.json, however you may need to correct formatting by running an nx format command and committing the changes. --- nx.json | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/nx.json b/nx.json index bed48e3..8e6281f 100644 --- a/nx.json +++ b/nx.json @@ -2,7 +2,10 @@ "$schema": "./node_modules/nx/schemas/nx-schema.json", "defaultBase": "master", "namedInputs": { - "default": ["{projectRoot}/**/*", "sharedGlobals"], + "default": [ + "{projectRoot}/**/*", + "sharedGlobals" + ], "production": [ "default", "!{projectRoot}/.eslintrc.json", @@ -38,7 +41,9 @@ "options": { "targetName": "test" }, - "exclude": ["apps/be-e2e/**/*"] + "exclude": [ + "apps/be-e2e/**/*" + ] }, { "plugin": "@nx/next/plugin", @@ -59,7 +64,7 @@ } } ], - "nxCloudAccessToken": "YTNiZTM5ZDgtNGEyMS00OGM3LTlkNmItNjc3YzNkNTZhMGI1fHJlYWQtd3JpdGU=", + "nxCloudAccessToken": "NTY4ZjhhNzUtM2MzYy00MmQ5LWFmNTAtZTBlYzQ3N2JiNjVlfHJlYWQtd3JpdGU=", "generators": { "@nx/next": { "application": { @@ -68,4 +73,4 @@ } } } -} +} \ No newline at end of file From 8c69b5e3459975ef5dfbd134f6b2ec2dd7a672e5 Mon Sep 17 00:00:00 2001 From: lehuygiang28 Date: Sat, 29 Jun 2024 11:37:44 +0700 Subject: [PATCH 2/3] style: :art: format --- apps/fe/project.json | 6 +++--- nx.json | 11 +++-------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/apps/fe/project.json b/apps/fe/project.json index 02a7d79..2a51d1c 100644 --- a/apps/fe/project.json +++ b/apps/fe/project.json @@ -28,12 +28,12 @@ }, "build": { "executor": "@nx/next:build", - "outputs": ["{options.outputPath}"], - "defaultConfiguration": "production", - "cache": true, "options": { "outputPath": "dist/apps/fe" }, + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "cache": true, "configurations": { "development": { "outputPath": "." diff --git a/nx.json b/nx.json index 8e6281f..593ccf6 100644 --- a/nx.json +++ b/nx.json @@ -2,10 +2,7 @@ "$schema": "./node_modules/nx/schemas/nx-schema.json", "defaultBase": "master", "namedInputs": { - "default": [ - "{projectRoot}/**/*", - "sharedGlobals" - ], + "default": ["{projectRoot}/**/*", "sharedGlobals"], "production": [ "default", "!{projectRoot}/.eslintrc.json", @@ -41,9 +38,7 @@ "options": { "targetName": "test" }, - "exclude": [ - "apps/be-e2e/**/*" - ] + "exclude": ["apps/be-e2e/**/*"] }, { "plugin": "@nx/next/plugin", @@ -73,4 +68,4 @@ } } } -} \ No newline at end of file +} From d20dfda9f91eb60e739a283bf2c263e11d97c616 Mon Sep 17 00:00:00 2001 From: lehuygiang28 Date: Sat, 29 Jun 2024 11:38:13 +0700 Subject: [PATCH 3/3] ci: :zap: enable nx remote cache --- package.json | 6 +++--- vercel.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 69d24ee..8b53271 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ "scripts": { "fe": "yarn nx dev:rf fe", "be": "yarn nx serve be --configuration=development", - "fe:build": "yarn nx build fe --skip-nx-cache", - "fe:prod": "yarn nx start fe --configuration=production --skip-nx-cache", - "be:prod": "yarn nx serve be --configuration=production --skip-nx-cache" + "fe:build": "yarn nx build fe", + "fe:prod": "yarn nx start fe --configuration=production", + "be:prod": "yarn nx serve be --configuration=production" }, "dependencies": { "@ant-design/icons": "^5.3.7", diff --git a/vercel.json b/vercel.json index 0b4fe9f..37f94f3 100644 --- a/vercel.json +++ b/vercel.json @@ -3,7 +3,7 @@ "framework": "nextjs", "regions": ["sin1"], "installCommand": "yarn install --immutable", - "buildCommand": "yarn nx build fe --skip-nx-cache", + "buildCommand": "yarn nx build fe", "outputDirectory": "dist/apps/fe/.next", "cleanUrls": true }