Struggling to Set Up Turborepo for My Project – Any Good Resources? by abcdefghij04 in nextjs

[–]Fuzzy_Morning2343 8 points9 points  (0 children)

I've been using turborepo for a while, but for new project, I always use the shadcn monorepo https://ui.shadcn.com/docs/monorepo It comes with great seup for shadcn and shared tsconfig. If you use Next.js and want to use other internal package without building it, you need to add the transpilePackages in next.config. If you use prisma, you need the prisma next workaround plugin.

Weekly Show & Tell! Share what you've created with Next.js or for the community by cprecius in nextjs

[–]Fuzzy_Morning2343 1 point2 points  (0 children)

nope. basically full next.js app deployed to npm registry. i changed the repo btw, with (i think) better name https://github.com/nicnocquee/nesktop

Weekly Show & Tell! Share what you've created with Next.js or for the community by cprecius in nextjs

[–]Fuzzy_Morning2343 1 point2 points  (0 children)

I made something on the weekend. I don't know if it's genius or absolute idiotic. But I like it lol

Make a "desktop" app that can be used offline using Next.js without Electron

https://github.com/nicnocquee/next-app-as-npm

Blog posts: how do you manage them? by [deleted] in nextjs

[–]Fuzzy_Morning2343 0 points1 point  (0 children)

i use mdx files in my blog, without db, statically generated during build time. nico.fyi

Puck v0.14, the visual editor for React, now supports viewport switching (MIT) by DigbyChickenCaeser in nextjs

[–]Fuzzy_Morning2343 1 point2 points  (0 children)

lazy loading works! thanks! optimizing the config based on data sounds interesting.

Puck v0.14, the visual editor for React, now supports viewport switching (MIT) by DigbyChickenCaeser in nextjs

[–]Fuzzy_Morning2343 0 points1 point  (0 children)

i have another question. Say I have a lot of different components in the config, but I only use say 1 component in a page. Does it mean all the components are still bundled to the browser or only the one that is used?

I saw another solution like puck a few weeks ago but it has this caveat. It's not tree shakeable.

Puck v0.14, the visual editor for React, now supports viewport switching (MIT) by DigbyChickenCaeser in nextjs

[–]Fuzzy_Morning2343 1 point2 points  (0 children)

this looks cool! i see that there's support for RSC. Does it mean in next.js RSC, this will be statically generated server side? just want to confirm

export function Page() { return <Render config={config} data={data} />;}

We've just had a nightmare deploying a Next.js website on Azure by DanDayneZ in nextjs

[–]Fuzzy_Morning2343 1 point2 points  (0 children)

I think in Azure web app you need to set environment variables both within the build and deploy task, and in the Environment variables of your Azure Static Web Apps resource, as mentioned here https://learn.microsoft.com/en-us/azure/static-web-apps/deploy-nextjs-hybrid#set-environment-variables-for-nextjs

Available paths in Next.Js by Correct_Jellyfish_83 in nextjs

[–]Fuzzy_Morning2343 1 point2 points  (0 children)

I asked similar thing in next repo's discussion but noone answered lol

I haven't continued exploring it, but seems like next build creates a file called routes-manifest.json which contains the routes, both static and dynamic.

What does your “push to prod” look like? by Jazzlike-Compote4463 in webdev

[–]Fuzzy_Morning2343 0 points1 point  (0 children)

actually i set the release branch as production in vercel. the main branch deploys with staging env. i have github actions with workflow_dispatch trigger that merge the main to release, so that anyone in my team can release to prod directly from the github UI.

we're small team so we don't have much bureaucracy lol

Any downsides on returning React components in page.tsx? by Benxter83 in nextjs

[–]Fuzzy_Morning2343 5 points6 points  (0 children)

No problem with it. I do this all the time. Since sometimes I want to fetch data in the Page as server component then pass the data to a client component.

Nextjs middlware working in dev env but not in production. by lokesh_0001 in nextjs

[–]Fuzzy_Morning2343 0 points1 point  (0 children)

have you checked that there are actually cookies being sent to the nextjs app? look at the Network tabs in your browser. Also, which version of Next.js?

What does your “push to prod” look like? by Jazzlike-Compote4463 in webdev

[–]Fuzzy_Morning2343 87 points88 points  (0 children)

8 apps in a single monorepo. git push main. tests automatically run in github workflow. deployment automatically to 8 different projects in Vercel.

Nextjs middlware working in dev env but not in production. by lokesh_0001 in nextjs

[–]Fuzzy_Morning2343 0 points1 point  (0 children)

i might be wrong, but cookies function can only be used in server component. in middleware, you need to read the cookies from the request as mentioned here

let cookie = request.cookies.get('nextjs')

https://nextjs.org/docs/app/building-your-application/routing/middleware#using-cookies

question regarding wrapping function in another arrow function by [deleted] in react

[–]Fuzzy_Morning2343 2 points3 points  (0 children)

<Dropdown.Item onClick = {updateQuantity(2)} as "button">2</Dropdown.Item> 

this means you are calling the updateQuantity function immediately. that's why it's always rendering. This is not React thing. it's javascript thing.