Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue with next/dynamic when running next version > 12.0.3 #618

Merged
merged 2 commits into from
Dec 22, 2021

Conversation

MikeDupree
Copy link
Contributor

@MikeDupree MikeDupree commented Dec 17, 2021

Fixes issue seen with next/dynamic when running yarn install due to problems with newer versions of next

Regarding issue #614

vercel/next.js#31683

@vercel
Copy link

vercel bot commented Dec 17, 2021

Someone is attempting to deploy a commit to the Vercel Solutions Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Dec 17, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

commerce-local – ./

🔍 Inspect: https://vercel.com/vercel-solutions-vtest314/commerce-local/5EQ8JMcwLTwcq8LtkCGras8Wt5c2
✅ Preview: https://commerce-local-git-fork-dooptr-7b5e2f-vercel-solutions-vtest314.vercel.app

@MikeDupree MikeDupree changed the title Fixes issue with next/dynamin when running next version > 12.0.3 Fixes issue with next/dynamic when running next version > 12.0.3 Dec 17, 2021
components/common/Layout/Layout.tsx Outdated Show resolved Hide resolved
components/common/Layout/Layout.tsx Show resolved Hide resolved
components/common/Layout/Layout.tsx Outdated Show resolved Hide resolved
components/common/Layout/Layout.tsx Show resolved Hide resolved
components/common/Layout/Layout.tsx Outdated Show resolved Hide resolved
@MikeDupree
Copy link
Contributor Author

Updated to use prop spreading as suggested by @ancaemcken

@@ -31,22 +31,31 @@ const dynamicProps = {

const SignUpView = dynamic(
() => import('@components/auth/SignUpView'),
dynamicProps
{
...dynamicProps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the cases that we don't need to extend the object can you leave it like before? Or does it have any problem with it?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dynamic() needs an object literal, the way it was before was causing the issue

@goncy goncy merged commit 4b2df22 into vercel:main Dec 22, 2021
loan-laux pushed a commit to TrellisCommerce/next-commerce-bigcommerce that referenced this pull request May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants