Skip to content

Commit

Permalink
chore: simplified storybook/next config (#7280)
Browse files Browse the repository at this point in the history
Co-authored-by: Augustin Mauroy <[email protected]>
  • Loading branch information
ovflowd and AugustinMauroy authored Nov 24, 2024
1 parent d50d114 commit c17fccb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
10 changes: 0 additions & 10 deletions apps/site/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,14 @@ 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, '../'),
},
},
// 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'),
],
Expand Down
8 changes: 2 additions & 6 deletions apps/site/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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',
Expand Down
16 changes: 12 additions & 4 deletions apps/site/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand Down

0 comments on commit c17fccb

Please sign in to comment.