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

updated remix dep #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

christopherpickering
Copy link

This pr updates remix to v 1.16.1 to resolve this issue.

Thanks for the great example!

@christopherpickering
Copy link
Author

A few more comments of what would need to be changed to work with remix v2.

remix.config.js

The following could be added to the exports:

future: {
    v2_routeConvention: true,
    v2_errorBoundary: true,
    v2_meta: true,
    v2_normalizeFormMethod: true,
  },
serverModuleFormat:"cjs",

Routes

The route structure should be flattened (note the double underscore to single as well):

image

root.tsx

Metadata function could be updated to the new format:

export const meta: MetaFunction = () => ([
    {charset: 'utf-8'},
    {title: 'Payload CMS & Remix Monorepo'},
    {viewport: 'width=device-width,initial-scale=1'},
]);

_page.$page.tsx

Metadata could be updated to the new format (note the change in the findPageBySlug params as well)

export const meta: MetaFunction = ({ params, matches }) => {
    const { page: pageSlug } = params;

    const page = findPageBySlug(pageSlug ?? 'home', matches);
    return [{
        title: page?.meta.title},
        {description: page?.meta.description},
        {keywords: page?.meta.keywords},
    ];
};

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.

Node 20: Running any remix app returns TypeError: Value of "this" must be of type URLSearchParams
1 participant