Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
From 6a8571098024d1eb69efaae1f1622b3a91417b5f Mon Sep 17 00:00:00 2001
|
|
From: tropf <tropf@users.noreply.github.com>
|
|
Date: Tue, 26 Aug 2025 15:08:07 +0200
|
|
Subject: [PATCH 1/2] replace version check using package.json
|
|
|
|
In the distributed (nix) version, package.json is not available under
|
|
the expected path. As nix can inject the version during build time, this
|
|
patch removes the reference to package.json, and injects a marker for
|
|
the version to be replaced during the patchPhase.
|
|
---
|
|
packages/web/nextjs/next.config.js | 6 +-----
|
|
1 file changed, 1 insertion(+), 5 deletions(-)
|
|
|
|
diff --git a/packages/web/nextjs/next.config.js b/packages/web/nextjs/next.config.js
|
|
index 9b2b364..db9d680 100644
|
|
--- a/packages/web/nextjs/next.config.js
|
|
+++ b/packages/web/nextjs/next.config.js
|
|
@@ -5,10 +5,6 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
|
enabled: process.env.ANALYZE === "true"
|
|
});
|
|
|
|
-const packageJson = require(`${
|
|
- fs.existsSync(path.join(__dirname, "package.json")) ? "./" : "../"
|
|
-}package.json`);
|
|
-
|
|
module.exports = withBundleAnalyzer({
|
|
reactStrictMode: true,
|
|
target: "serverless",
|
|
@@ -16,7 +12,7 @@ module.exports = withBundleAnalyzer({
|
|
trailingSlash: true,
|
|
serverRuntimeConfig: {
|
|
PROJECT_ROOT: __dirname, // https://github.com/vercel/next.js/issues/8251
|
|
- VERSION: packageJson.version
|
|
+ VERSION: "@NIX_LOG4BRAINS_VERSION@",
|
|
},
|
|
webpack(config, { webpack, buildId }) {
|
|
// For cache invalidation purpose (thanks https://github.com/vercel/next.js/discussions/14743)
|
|
--
|
|
2.50.1
|
|
|