Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DOCS] async withContentCollections #391

Open
Labels
documentationImprovements or additions to documentation
@mxkaske

Description

This is more informational! Thanks for that awesome library!

We faced an issue within next.config.js that was not mentioned in the docs so far: the withContentCollections returns a promise and therefore needs to be awaited in some cases (e.g. when using multiple config extensions).

// next.config.js
module.exports = withSentryConfig(async () => await withContentCollections(nextConfig), { ... });

vs.

// next.config.js
module.exports = withContentCollections(withSentryConfig(nextConfig, { ... }));

The referenced change for OpenStatus: https://github.com/openstatusHQ/openstatus/pull/1084/files#diff-a5de0fa0d80f14a44e9bdf2ed5d0cbb3a7bd5fdcacfbc1d03b5dcb57fc4943c1R59

Nextjs docs: https://nextjs.org/docs/messages/promise-in-next-config

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /