From 1c2774ea3456e1e7c55654dd71c20f28e74f0dc7 Mon Sep 17 00:00:00 2001 From: Fran McDade Date: Wed, 28 Feb 2024 14:14:34 +1000 Subject: [PATCH] fix: updated build script (#2370) --- next/next.config.mjs | 1 + next/package.json | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/next/next.config.mjs b/next/next.config.mjs index 4f03dde2f..045f7185d 100644 --- a/next/next.config.mjs +++ b/next/next.config.mjs @@ -7,6 +7,7 @@ const nextConfig = { images: { disableStaticImages: true, }, + output: "export", webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => { // Add the alias for the peer dependency config.resolve.alias["@emotion/react"] = path.resolve( diff --git a/next/package.json b/next/package.json index 51f26cca4..23e521053 100644 --- a/next/package.json +++ b/next/package.json @@ -4,10 +4,10 @@ "private": true, "scripts": { "dev": "./scripts/dev.sh data-portal && next dev", - "build-dev:data-portal": "scripts/common-build.sh data-portal dev && next build && next export -o out && npm run postbuild", - "build-prod:data-portal": "./scripts/common-build.sh data-portal prod && next build && next export -o out && npm run postbuild", + "build-dev:data-portal": "scripts/common-build.sh data-portal dev && next build && npm run postbuild", + "build-prod:data-portal": "./scripts/common-build.sh data-portal prod && next build && npm run postbuild", "build": "next build", - "start": "next start", + "start": "npx serve out", "lint": "next lint", "check-format": "prettier --check .", "format": "prettier --write .",