nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.52k stars 2.35k forks source link

Migration update-vite-config incorrectly updates configuration #20921

Closed paustint closed 5 months ago

paustint commented 10 months ago

EDIT: Potentially resolved by this? https://github.com/nrwl/nx/pull/20693 I did not try it to confirm.

Current Behavior

update-vite-config migration updated my custom plugin instead of the actual vite configuration.

In addition, worker plugins should have been updated to a function instead of an array as part of migration for this vite breaking change

Expected Behavior

The vite configuration should have correctly identified the configuration, and not other non-configuration data within the file.

GitHub Repo

https://github.com/jetstreamapp/jetstream/tree/v3.7.0

Steps to Reproduce

  1. On provided repository, upgrade nx npx nx migrate latest
  2. Run yarn
  3. Delete update-17-2-7 from the migration file to workaround #20920 since that issue is irrelevant here.
  4. Run npx nx migrate --run-migrations
  5. Observe the vite.config.ts

image

Nx Report

>  NX   Report complete - copy this into the issue template

   Node   : 18.16.0
   OS     : darwin-arm64
   yarn   : 1.22.19

   nx                 : 17.2.7
   @nx/js             : 17.2.7
   @nx/jest           : 17.2.7
   @nx/linter         : 17.2.7
   @nx/eslint         : 17.2.7
   @nx/workspace      : 17.2.7
   @nx/cypress        : 17.2.7
   @nx/devkit         : 17.2.7
   @nx/eslint-plugin  : 17.2.7
   @nx/express        : 17.2.7
   @nx/next           : 17.2.7
   @nx/node           : 17.2.7
   @nx/plugin         : 17.2.7
   @nx/react          : 17.2.7
   @nx/storybook      : 17.2.7
   @nrwl/tao          : 17.2.7
   @nx/vite           : 17.2.7
   @nx/web            : 17.2.7
   @nx/webpack        : 17.2.7
   typescript         : 5.2.2
   ---------------------------------------
   Community plugins:
   @mands/nx-playwright : 0.6.2
   nx-electron          : 15.0.0
   ---------------------------------------
   Local workspace plugins:
         @jetstream/workspace-plugin

Failure Logs

No response

Package Manager Version

yarn 1.22.19

Operating System

Additional Information

No response

github-actions[bot] commented 4 months ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.