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

package.json development exports only #12532

Closed
tomchochola opened this issue Dec 12, 2024 · 1 comment
Closed

package.json development exports only #12532

tomchochola opened this issue Dec 12, 2024 · 1 comment
Labels

Comments

@tomchochola
Copy link

I'm using React Router as a...

library

Reproduction

Goto https://www.npmjs.com/package/react-router?activeTab=code and see the package.json or the dist folder. In the package.json only the dist/development is in use. The dist/production is not in use. Webpack bundle analyzer reports the development files used in the production bundle.

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12600K
    Memory: 25.30 GB / 31.22 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.18.1 - /usr/bin/node
    Yarn: 1.22.22 - /usr/bin/yarn
    npm: 10.9.2 - /usr/bin/npm
  npmPackages:
    react-router: ^7.0 => 7.0.2

Used Package Manager

npm

Expected Behavior

Expect then the NODE_ENV=production that the dist/production files should be in use.

Actual Behavior

The dist/development files are used for both development and production builds.

@timdorr
Copy link
Member

timdorr commented Dec 15, 2024

This is due to #12437, which is intended to be temporary.

@timdorr timdorr closed this as completed Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants