🏗️(app-desk) export app in out folder

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.
This commit is contained in:
Anthony LC
2024-01-17 16:29:16 +01:00
committed by Anthony LC
parent c6823ba698
commit 9ee39e1068
4 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
};
module.exports = nextConfig;

View File

@@ -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",

View File

@@ -5,4 +5,5 @@ module.exports = {
'selector-class-pattern': null,
'no-descending-specificity': null,
},
ignoreFiles: ['out/**/*'],
};

View File

@@ -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,