Skip to content

Commit

Permalink
fix(site): nix build
Browse files Browse the repository at this point in the history
  • Loading branch information
uonr committed Dec 12, 2024
1 parent b51d9b7 commit 9529689
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/site/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const path = require('path');
const withBundleAnalyzer = require('@next/bundle-analyzer')();
const BACKEND_URL = process.env.BACKEND_URL;
const STANDALONE = process.env.STANDALONE === 'true';
if (!BACKEND_URL) {
throw new Error('BACKEND_URL is required');
}
Expand All @@ -20,13 +21,17 @@ const config = {
eslint: {
dirs: ['src', 'tests'],
},
output: STANDALONE ? 'standalone' : undefined,
env: {
PUBLIC_MEDIA_URL: process.env.PUBLIC_MEDIA_URL,
BACKEND_URL: process.env.BACKEND_URL,
APP_URL: process.env.APP_URL,
DOMAIN: process.env.DOMAIN,
},
transpilePackages: ['@boluo/ui', '@boluo/common'],
experimental: {
outputFileTracingRoot: STANDALONE ? path.join(__dirname, '../../') : undefined,
},
rewrites,
webpack: (config) => {
// `react-intl` without parser
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@

PUBLIC_MEDIA_URL = "https://media.boluo.chat";
BACKEND_URL = "https://boluo.chat";
STANDALONE = "true";

configurePhase = ''
runHook preConfigure
Expand Down

0 comments on commit 9529689

Please sign in to comment.