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

@nx/vite/plugins/nx-tsconfig-paths.plugin always output package.json #29466

Open
4 tasks
xiejay97 opened this issue Dec 25, 2024 · 1 comment
Open
4 tasks

@nx/vite/plugins/nx-tsconfig-paths.plugin always output package.json #29466

xiejay97 opened this issue Dec 25, 2024 · 1 comment

Comments

@xiejay97
Copy link
Contributor

Current Behavior

I use @nx/vite:build and options include "generatePackageJson": false.It cant work!

Expected Behavior

"generatePackageJson": false dont output package.json.

GitHub Repo

No response

Steps to Reproduce

Nx Report

NX   Report complete - copy this into the issue template

Node           : 22.12.0
OS             : linux-x64
Native Target  : x86_64-linux
pnpm           : 9.6.0

nx                     : 20.3.0
@nx/js                 : 20.3.0
@nx/eslint             : 20.3.0
@nx/workspace          : 20.3.0
@nx/devkit             : 20.3.0
@nx/eslint-plugin      : 20.3.0
@nx/module-federation  : 20.3.0
@nx/react              : 20.3.0
@nx/vite               : 20.3.0
@nx/web                : 20.3.0
typescript             : 5.7.2
---------------------------------------
Registered Plugins:
@nx/vite/plugin
@nx/eslint/plugin

Failure Logs

Package Manager Version

No response

Operating System

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

Additional Information

No response

@xiejay97
Copy link
Contributor Author

Link here:

async writeBundle(options) {
if (isUsingTsSolutionSetup()) return;
const outDir = options.dir || 'dist';
const src = resolve(projectRoot, 'package.json');
if (existsSync(src)) {
const dest = join(outDir, 'package.json');
try {
copyFileSync(src, dest);
} catch (err) {
console.error('Error copying package.json:', err);
}
}
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant