From a98d3dc9e46deabfec1fb58efe6426b620445f8c Mon Sep 17 00:00:00 2001 From: bra40 Date: Sun, 19 Nov 2023 21:54:10 -0800 Subject: [PATCH] Revert "Test override paths" This reverts commit 24d096299c67de9240f3bda22f1f38d5a8cf5c1c. --- next.config.js | 2 -- pages/blog/[slug].js | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/next.config.js b/next.config.js index e5c63aa..a083fc6 100644 --- a/next.config.js +++ b/next.config.js @@ -5,9 +5,7 @@ const nextConfig = { output: "export", images: { domains: ["cdn.sanity.io"], - unoptimized: true, }, - webpack: (config, { isServer }) => { if (!isServer) { // don't resolve 'fs' module on the client to prevent this error on build --> Error: Can't resolve 'fs' diff --git a/pages/blog/[slug].js b/pages/blog/[slug].js index 2d20695..a18e57e 100644 --- a/pages/blog/[slug].js +++ b/pages/blog/[slug].js @@ -86,9 +86,8 @@ export default function ProjectSlugRoute(props) { export const getStaticPaths = async () => { const client = getClient(); const slugs = await client.fetch(postSlugsQuery); - return { - paths: ["first-post", "second-post"], + paths: slugs ? slugs.map(({ slug }) => `/blog/${slug}`) : [], fallback: false, }; };