From c250670f1b0bc0751ea3fd4bb51fb099c6b58408 Mon Sep 17 00:00:00 2001 From: Claudio Wunder Date: Sat, 23 Nov 2024 17:56:29 +0100 Subject: [PATCH 1/3] chore: simplified storybook/next config --- apps/site/.storybook/main.ts | 8 -------- apps/site/next.config.mjs | 8 ++------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/apps/site/.storybook/main.ts b/apps/site/.storybook/main.ts index 33db0069c6ee6..7a5202a6c1afa 100644 --- a/apps/site/.storybook/main.ts +++ b/apps/site/.storybook/main.ts @@ -45,7 +45,6 @@ const config: StorybookConfig = { resolve: { ...config.resolve, alias: { - '@nodevu/core': false, 'next-intl/navigation': join(mocksFolder, './next-intl.mjs'), '@/client-context': join(mocksFolder, './client-context.mjs'), '@': join(__dirname, '../'), @@ -53,16 +52,9 @@ const config: StorybookConfig = { }, // We need to configure `node:` APIs as Externals to WebPack // since essentially they're not supported on the browser - externals: { - 'node:fs': 'commonjs fs', - 'node:url': 'commonjs url', - 'node:path': 'commonjs path', - 'node:readline': 'commonjs readline', - }, // Removes Pesky Critical Dependency Warnings due to `next/font` ignoreWarnings: [ e => - e.message.includes('Critical dep') || e.message.includes('was not found in') || e.message.includes('generated code contains'), ], diff --git a/apps/site/next.config.mjs b/apps/site/next.config.mjs index 167b52803379e..91c19366aae3c 100644 --- a/apps/site/next.config.mjs +++ b/apps/site/next.config.mjs @@ -7,11 +7,6 @@ import { redirects, rewrites } from './next.rewrites.mjs'; /** @type {import('next').NextConfig} */ const nextConfig = { - // Just to ensure that React is always on strict mode - reactStrictMode: true, - // We intentionally disable Next.js's built-in i18n support - // as we dom have our own i18n and internationalisation engine - i18n: null, // We don't use trailing slashes on URLs from the Node.js Website trailingSlash: false, // We don't want to redirect with trailing slashes @@ -23,7 +18,8 @@ const nextConfig = { images: { // We disable image optimisation during static export builds unoptimized: ENABLE_STATIC_EXPORT, - // We add it to the remote pattern for the static images we use from GitHub + // We add it to the remote pattern for the static images we use from multiple sources + // to be marked as safe sources (these come from Markdown files) remotePatterns: [ { protocol: 'https', From f759311c4137bbf7c5545d3c9c15ded7c604c80e Mon Sep 17 00:00:00 2001 From: Claudio Wunder Date: Sat, 23 Nov 2024 18:06:52 +0100 Subject: [PATCH 2/3] chore: env vars --- apps/site/turbo.json | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/site/turbo.json b/apps/site/turbo.json index 00975a1d5573f..451ec871b7352 100644 --- a/apps/site/turbo.json +++ b/apps/site/turbo.json @@ -16,7 +16,9 @@ "NEXT_PUBLIC_BASE_PATH", "NEXT_PUBLIC_ORAMA_API_KEY", "NEXT_PUBLIC_ORAMA_ENDPOINT", - "NEXT_PUBLIC_DATA_URL" + "NEXT_PUBLIC_DATA_URL", + "TURBO_CACHE", + "TURBO_TELEMETRY_DISABLED" ] }, "build": { @@ -39,7 +41,9 @@ "NEXT_PUBLIC_BASE_PATH", "NEXT_PUBLIC_ORAMA_API_KEY", "NEXT_PUBLIC_ORAMA_ENDPOINT", - "NEXT_PUBLIC_DATA_URL" + "NEXT_PUBLIC_DATA_URL", + "TURBO_CACHE", + "TURBO_TELEMETRY_DISABLED" ] }, "start": { @@ -55,7 +59,9 @@ "NEXT_PUBLIC_BASE_PATH", "NEXT_PUBLIC_ORAMA_API_KEY", "NEXT_PUBLIC_ORAMA_ENDPOINT", - "NEXT_PUBLIC_DATA_URL" + "NEXT_PUBLIC_DATA_URL", + "TURBO_CACHE", + "TURBO_TELEMETRY_DISABLED" ] }, "deploy": { @@ -77,7 +83,9 @@ "NEXT_PUBLIC_BASE_PATH", "NEXT_PUBLIC_ORAMA_API_KEY", "NEXT_PUBLIC_ORAMA_ENDPOINT", - "NEXT_PUBLIC_DATA_URL" + "NEXT_PUBLIC_DATA_URL", + "TURBO_CACHE", + "TURBO_TELEMETRY_DISABLED" ] }, "lint:js": { From 09b28bac8503354b4dd8028d70cd9c3e80e7db51 Mon Sep 17 00:00:00 2001 From: Claudio W Date: Sat, 23 Nov 2024 18:07:15 +0100 Subject: [PATCH 3/3] Update apps/site/.storybook/main.ts Co-authored-by: Augustin Mauroy Signed-off-by: Claudio W --- apps/site/.storybook/main.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/site/.storybook/main.ts b/apps/site/.storybook/main.ts index 7a5202a6c1afa..8c8a4087103a6 100644 --- a/apps/site/.storybook/main.ts +++ b/apps/site/.storybook/main.ts @@ -50,8 +50,6 @@ const config: StorybookConfig = { '@': join(__dirname, '../'), }, }, - // We need to configure `node:` APIs as Externals to WebPack - // since essentially they're not supported on the browser // Removes Pesky Critical Dependency Warnings due to `next/font` ignoreWarnings: [ e =>