## Current Behavior Nx currently supports Vite at version 5. Nx does not generate vite configurations using Vite 6 which has been released. ## Expected Behavior Nx should use Vite 6 for vite projects. ## TODO - [x] Add Package Update Migrations for Existing Projects - [x] Add AST migrations to handle breaking change in resolve.extensions - [x] Add migration to install `jsx` or `jiti` to handle processing TS postcss config files
13 lines
1.7 KiB
JSON
13 lines
1.7 KiB
JSON
{
|
|
"name": "update-20-5-0-update-resolve-conditions",
|
|
"version": "20.5.0-beta.3",
|
|
"description": "Update resolve.conditions to include defaults that are no longer provided by Vite.",
|
|
"implementation": "/packages/vite/src/migrations/update-20-5-0/update-resolve-conditions.ts",
|
|
"aliases": [],
|
|
"hidden": false,
|
|
"path": "/packages/vite",
|
|
"schema": null,
|
|
"type": "migration",
|
|
"examplesFile": "#### Update `resolve.conditions` to include defaults\n\nIn previous Vite versions, the `resolve.conditions` option had defaults that were added internally (i.e. `['module', 'browser', 'development|production']`). \nThis default was removed in Vite 6, so this migration adds it to your existing configuration to ensure that the behavior remains intact.\n\nLearn more: [https://vite.dev/guide/migration#default-value-for-resolve-conditions](https://vite.dev/guide/migration#default-value-for-resolve-conditions)\n\n{% callout type=\"note\" title=\"Remix\" %}\n\nRemix does not currently support Vite 6 and therefore any `vite.config` file for Remix will not be migrated.\n\n{% /callout %}\n\n#### Sample Code Changes\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```{% fileName=\"vite.config.ts\" %}\nimport { defineConfig } from 'vite';\n\nexport default defineConfig({\n resolve: {\n conditions: ['require'],\n },\n build: {\n outDir: 'dist',\n },\n});\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```{% highlightLines=[4,5,6] fileName=\"vite.config.ts\" %}\nimport { defineConfig } from 'vite';\n\nexport default defineConfig({\n resolve: {\n conditions: ['require', 'module', 'browser', 'development|production'],\n },\n build: {\n outDir: 'dist',\n },\n});\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
|
}
|