@nx/vite:migrations | Nx

Migration References

Here is a list of all migrations available for this package.

  • 20.7.x

  • 20.7.1-package-updates

    Version: 20.7.1-beta.0

    Packages

    NameVersionAlways Add to package.json
    @analogjs/vite-plugin-angular~1.14.1Update only
    @analogjs/vitest-angular~1.14.1Update only
  • 20.5.x

  • update-20-5-0-update-resolve-conditions

    Update resolve.conditions to include defaults that are no longer provided by Vite.

    Version: 20.5.0-beta.3

    Update resolve.conditions to include defaults

    In previous Vite versions, the resolve.conditions option had defaults that were added internally (i.e. ['module', 'browser', 'development|production']).
    This default was removed in Vite 6, so this migration adds it to your existing configuration to ensure that the behavior remains intact.

    Learn more: https://vite.dev/guide/migration#default-value-for-resolve-conditions

    Remix

    Remix does not currently support Vite 6 and therefore any vite.config file for Remix will not be migrated.

    Sample Code Changes

    vite.config.ts
    1import { defineConfig } from 'vite'; 2 3export default defineConfig({ 4 resolve: { 5 conditions: ['require'], 6 }, 7 build: { 8 outDir: 'dist', 9 }, 10}); 11

    eslint-ignore-vite-temp-files

    Add vite config temporary files to the ESLint configuration ignore patterns if ESLint is used.

    Version: 20.5.0-beta.3

    Sample Code Changes

    Add vite.config.*.timestamp* and vitest.config.*.timestamp* to the root eslint.config.mjs file (using ESLint Flat Config).

    eslint.config.mjs
    1export default [ 2 { 3 ignores: ['dist'], 4 }, 5]; 6

    Add vite.config.*.timestamp* and vitest.config.*.timestamp* to the project's .eslintrc.json file (using eslintrc format config).

    apps/app1/eslintrc.json
    1{ 2 "ignorePatterns": ["!**/*"] 3} 4

    20.5.0-package-updates

    Version: 20.5.0-beta.3

    Packages

    NameVersionAlways Add to package.json
    vite^6.0.0Update only
    vite-plugin-dts~4.5.0Update only

    update-20-5-0-install-jiti

    Install jiti as a devDependency to allow vite to parse TS postcss files.

    Version: 20.5.0-beta.2
  • 20.3.x

  • update-20-3-0

    Add gitignore entry for temporary vitest config files.

    Version: 20.3.0-beta.2

    Add Vitest Temp Files to Git Ignore

    Add gitignore entry for temporary vitest config files.

    Sample Code Changes

    Adds the following entries to the .gitignore file.

    .gitignore
    1vite.config.*.timestamp* 2vitest.config.*.timestamp* 3
  • 20.0.x

  • update-20-0-6

    Add gitignore entry for temporary vite config files and remove previous incorrect glob.

    Version: 20.0.6-beta.0

    Add Vite Temp Files to Git Ignore

    Add gitignore entry for temporary vite config files.

    Sample Code Changes

    Adds the following entries to the .gitignore file.

    .gitignore
    1vite.config.*.timestamp* 2vitest.config.*.timestamp* 3

    update-20-0-4

    Add gitignore entry for temporary vite config files.

    Version: 20.0.4-beta.0

    Add Vite Temp Files to Git Ignore

    Add gitignore entry for temporary vite config files.

    Sample Code Changes

    Adds the following entries to the .gitignore file.

    .gitignore
    1vite.config.*.timestamp* 2vitest.config.*.timestamp* 3
  • 19.6.x

  • update-19-6-0-add-depends-on-for-preview-server

    Add dependsOn: [build] to preview targets using preview-server

    Version: 19.6.0-beta.0