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

fix: Add conditions to determine the next dev. #416

Closed
wants to merge 2 commits into from

Conversation

kamtorocks
Copy link

@kamtorocks kamtorocks commented Apr 7, 2023

Since next@v13.2.5-canary.27, next dev has been using jest-worker to start the service.
This will cause contentlayer to not generate files when starting the service using next dev.

The update of 'next' is as follows.
https://github.com/vercel/next.js/pull/47208/files#diff-0ff576bd02e76f96680accff48ecbe4126a7f6bc4eafa547b6d44dee49bab770R166-R180

FIx #415

Since next@v13.2.5-canary.27, next dev has been using jest-worker to start the service.
Since next@v13.2.5-canary.27, next dev has been using jest-worker to start the service.
@changeset-bot
Copy link

changeset-bot bot commented Apr 7, 2023

⚠️ No Changeset found

Latest commit: 9911232

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "examples-*" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@jgillich
Copy link

Is it not possible to check the phase in a plugin? See the bottom example on this page https://nextjs.org/docs/api-reference/next.config.js/introduction

@spcbfr
Copy link

spcbfr commented Apr 16, 2023

I hope this gets added soon!

@schickling schickling added this to the 0.3.2 milestone Apr 24, 2023
@schickling
Copy link
Collaborator

Thanks a lot for helping out with this PR. I've refactored the next-contentlayer plugin which now leverages the Webpack mode to distinguish between dev and build.

@jgillich after chatting with some folks on the Next.js team it seems phase isn't encouraged to be used anymore.

@schickling schickling closed this Apr 24, 2023
@kamtorocks kamtorocks deleted the fix/next-dev branch April 24, 2023 14:21
@schickling
Copy link
Collaborator

This should be addressed with the 0.3.2 release. 🎉

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.

No .contentlayer folder is generated in Next.js 13.3
4 participants