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(vite): build executor should not overwrite package.json in dist #16586

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

dmitry-stepanenko
Copy link
Contributor

@dmitry-stepanenko dmitry-stepanenko commented Apr 26, 2023

Current Behavior

Right now if any plugins process/create package.json during the build process, it will be overwritten by @nrwl/vite:build executor.

For example, using rollup-plugin-generate-package-json plugin, if you put in the app's vite config the following

    generatePackageJson({
      inputFolder: './',
      outputFolder: `./dist/apps/myapp`,
    }),

it will take no effect if built with nx

Expected Behavior

Should check for the existing package.json under dist and not overwrite it

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Apr 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2023 6:47pm

Copy link
Member

@mandarini mandarini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Dmitry!

@github-actions
Copy link

github-actions bot commented May 2, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants