Skip to content

Commit

Permalink
Revert "Test override paths"
Browse files Browse the repository at this point in the history
This reverts commit 24d0962.
  • Loading branch information
brianrahadi committed Nov 20, 2023
1 parent 24d0962 commit a98d3dc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 1 addition & 2 deletions pages/blog/[slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
};

0 comments on commit a98d3dc

Please sign in to comment.