From 9ee39e106886fd787ce1e9924b0a737efc46c3a1 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Wed, 17 Jan 2024 16:29:16 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F(app-desk)=20export=20app?= =?UTF-8?q?=20in=20out=20folder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We export the app in the out folder. This is a static export, so our app can be deployed and hosted on any web server that can serve HTML/CSS/JS static assets. --- src/frontend/apps/desk/next.config.js | 1 + src/frontend/apps/desk/package.json | 3 ++- src/frontend/apps/desk/stylelint.config.js | 1 + src/frontend/apps/e2e/playwright.config.ts | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/frontend/apps/desk/next.config.js b/src/frontend/apps/desk/next.config.js index 9355ff6..dc29843 100644 --- a/src/frontend/apps/desk/next.config.js +++ b/src/frontend/apps/desk/next.config.js @@ -1,5 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + output: 'export', }; module.exports = nextConfig; diff --git a/src/frontend/apps/desk/package.json b/src/frontend/apps/desk/package.json index 2c67947..6728da4 100644 --- a/src/frontend/apps/desk/package.json +++ b/src/frontend/apps/desk/package.json @@ -7,7 +7,7 @@ "build": "prettier --check . && yarn stylelint && next build", "build:ci": "cp .env.development .env.local && yarn build", "build-theme": "cunningham -g css,ts -o src/cunningham --utility-classes", - "start": "next start", + "start": "npx -y serve@latest out", "lint": "next lint", "prettier": "prettier --write .", "stylelint": "stylelint \"**/*.css\"", @@ -32,6 +32,7 @@ "@types/react": "18.2.47", "@types/react-dom": "18.2.18", "@typescript-eslint/eslint-plugin": "6.18.1", + "dotenv": "16.3.1", "eslint": "8.0.1", "eslint-config-next": "14.0.4", "eslint-config-prettier": "9.1.0", diff --git a/src/frontend/apps/desk/stylelint.config.js b/src/frontend/apps/desk/stylelint.config.js index c2c6a08..7c862f0 100644 --- a/src/frontend/apps/desk/stylelint.config.js +++ b/src/frontend/apps/desk/stylelint.config.js @@ -5,4 +5,5 @@ module.exports = { 'selector-class-pattern': null, 'no-descending-specificity': null, }, + ignoreFiles: ['out/**/*'], }; diff --git a/src/frontend/apps/e2e/playwright.config.ts b/src/frontend/apps/e2e/playwright.config.ts index d0c927c..eca5713 100644 --- a/src/frontend/apps/e2e/playwright.config.ts +++ b/src/frontend/apps/e2e/playwright.config.ts @@ -32,7 +32,7 @@ export default defineConfig({ }, webServer: { - command: `cd ../.. && yarn app:${process.env.CI ? "start" : "dev"} --port ${PORT}`, + command: `cd ../.. && yarn app:${process.env.CI ? "start -p " : "dev --port "} ${PORT}`, url: baseURL, timeout: 120 * 1000, reuseExistingServer: !process.env.CI,