Skip to content

Nx adds root package.json to the dist in standalone React app #27274

@Lonli-Lokli

Description

@Lonli-Lokli

Current Behavior

Nx adds root package.json to the dist in standalone React app

Expected Behavior

No package.json should be copied

GitHub Repo

https://github.com/Lonli-Lokli/issues-nrwl-nx-27274

Steps to Reproduce

  1. Create repo as per image
  2. Run npm run build
  3. Check that package.json exists in the dist folder
    image

Nx Report

NX   Report complete - copy this into the issue template

Node           : 18.20.3
OS             : win32-x64
Native Target  : x86_64-windows
npm            : 10.7.0

nx (global)        : 15.9.2
nx                 : 19.5.6
@nx/js             : 19.5.6
@nrwl/jest         : 12.8.0
@nx/linter         : 19.5.6
@nx/eslint         : 19.5.6
@nrwl/linter       : 12.8.0
@nx/workspace      : 19.5.6
@nrwl/cypress      : 12.8.0
@nx/devkit         : 19.5.6
@nx/eslint-plugin  : 19.5.6
@nx/react          : 19.5.6
@nrwl/storybook    : 12.8.0
@nrwl/tao          : 19.5.6
@nx/vite           : 19.5.6
@nx/web            : 19.5.6
typescript         : 5.5.4
---------------------------------------
Registered Plugins:
@nx/vite/plugin
---------------------------------------
The following packages should match the installed version of nx
  - @nrwl/[email protected]
  - @nrwl/[email protected]
  - @nrwl/[email protected]
  - @nrwl/[email protected]

To fix this, run `nx migrate [email protected]`

Failure Logs

No response

Package Manager Version

10.7.0

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Metadata

Metadata

Assignees

Labels

priority: mediumMedium Priority (not high, not low priority)scope: reactIssues related to React support for Nxtype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions