Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v3
Expand All @@ -73,12 +73,11 @@ jobs:
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
- name: Build and static HTML export with Next.js
# Files are exported after build to `docs` folder as specified in next.config.js `distDir` field
run: ${{ steps.detect-package-manager.outputs.runner }} next build
env:
GITHUB_TOKEN_READ_ONLY: ${{ secrets.TOKEN_READ_ONLY }}
- name: Static HTML export with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next export -o docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
3 changes: 2 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
output: 'standalone',
Copy link
Member

@r0qs r0qs Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this standalone by default? Should we still keep such behavior? I guess we can always set it to export for the website, no?

output: 'export',
distDir: 'docs',
experimental: { esmExternals: true },
trailingSlash: true,
}
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
"private": false,
"scripts": {
"dev": "next dev",
"build": "yarn lint && yarn format && npx next build && yarn export",
"build": "yarn lint && yarn format && next build",
"postbuild": "next-sitemap",
"start": "next start",
"lint": "next lint",
"format": "prettier --write .",
"export": "next export -o docs"
"format": "prettier --write ."
},
"dependencies": {
"@chakra-ui/icons": "^2.0.17",
Expand All @@ -32,7 +31,7 @@
"js-yaml": "^4.1.0",
"leaflet": "^1.9.4",
"leaflet-geosearch": "3.6.1",
"next": "13.5.6",
"next": "14.2.12",
"next-remove-imports": "^1.0.11",
"next-sitemap": "^4.1.8",
"react": "18.2.0",
Expand Down
Loading