Skip to content

RSC forked versions not working as expected #43540

Closed as not planned
Closed as not planned
@KATT

Description

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information


    Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101
    Binaries:
      Node: 18.9.0
      npm: 8.19.1
      Yarn: 1.22.17
      pnpm: 7.11.0
    Relevant packages:
      next: 13.0.6-canary.2
      eslint-config-next: 13.0.5
      react: 18.2.0
      react-dom: 18.2.0

What browser are you using? (if relevant)

Chrome

How are you deploying your application? (if relevant)

Vercel

Describe the Bug

As outlined in this React RFC, we should be able to define conditional exports.

As it seems, we have to define our conditional export both in our root /package.json & a contextual one in the subdirectory's package.json

Expected Behavior

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

https://github.com/KATT/forked-versions/pulls

To Reproduce

git clone git@github.com:KATT/forked-versions.git

Or just look at the repo: https://github.com/KATT/forked-versions

Branches:

Works? Branch PR link Description
Yes test/combination KATT/forked-versions#4 Defines the lib both in /package.json & /mylib/package.json
No test/package.json-imports KATT/forked-versions#2 Defines the lib only in /package.json
No test/contextual KATT/forked-versions#1 Defines the lib contextually in /mylib/package.json

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.staleThe issue has not seen recent activity.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions