diff --git a/packages/nuxt/src/generators/application/__snapshots__/application.spec.ts.snap b/packages/nuxt/src/generators/application/__snapshots__/application.spec.ts.snap index 940ac1136664f..24c372954b88e 100644 --- a/packages/nuxt/src/generators/application/__snapshots__/application.spec.ts.snap +++ b/packages/nuxt/src/generators/application/__snapshots__/application.spec.ts.snap @@ -7,7 +7,7 @@ exports[`app generated files content - as-provided - my-app general application .nuxt .nitro .cache -**/vite.config.*.timestamp*" +vite.config.*.timestamp*" `; exports[`app generated files content - as-provided - my-app general application should add the nuxt and vitest plugins 1`] = ` @@ -370,7 +370,7 @@ exports[`app generated files content - as-provided - myApp general application s .nuxt .nitro .cache -**/vite.config.*.timestamp*" +vite.config.*.timestamp*" `; exports[`app generated files content - as-provided - myApp general application should add the nuxt and vitest plugins 1`] = ` diff --git a/packages/remix/src/generators/application/lib/add-vite-temp-files-to-gitignore.ts b/packages/remix/src/generators/application/lib/add-vite-temp-files-to-gitignore.ts index 4d3217a7d34d4..e3d603042f112 100644 --- a/packages/remix/src/generators/application/lib/add-vite-temp-files-to-gitignore.ts +++ b/packages/remix/src/generators/application/lib/add-vite-temp-files-to-gitignore.ts @@ -1,7 +1,7 @@ import { stripIndents, Tree } from '@nx/devkit'; export function addViteTempFilesToGitIgnore(tree: Tree) { - let newGitIgnoreContents = `**/vite.config.*.timestamp*`; + let newGitIgnoreContents = `vite.config.*.timestamp*`; if (tree.exists('.gitignore')) { const gitIgnoreContents = tree.read('.gitignore', 'utf-8'); if (!gitIgnoreContents.includes(newGitIgnoreContents)) { diff --git a/packages/vite/src/generators/init/init.spec.ts b/packages/vite/src/generators/init/init.spec.ts index 88acfa8a8d5df..5e590a6d778b1 100644 --- a/packages/vite/src/generators/init/init.spec.ts +++ b/packages/vite/src/generators/init/init.spec.ts @@ -131,18 +131,14 @@ describe('@nx/vite:init', () => { it(`should not add multiple instances of the same vite temp file glob to gitignore`, async () => { // ARRANGE - tree.write( - '.gitignore', - '**/vite.config.{js,ts,mjs,mts,cjs,cts}.timestamp*' - ); + tree.write('.gitignore', 'vite.config.*.timestamp*'); // ACT await initGenerator(tree, {}); // ASSERT - expect(tree.read('.gitignore', 'utf-8')).toMatchInlineSnapshot(` - "**/vite.config.{js,ts,mjs,mts,cjs,cts}.timestamp* - **/vite.config.*.timestamp*" - `); + expect(tree.read('.gitignore', 'utf-8')).toMatchInlineSnapshot( + `"vite.config.*.timestamp*"` + ); }); }); diff --git a/packages/vite/src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore.spec.ts b/packages/vite/src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore.spec.ts index bb5c4b2c44f55..7a007c9f95091 100644 --- a/packages/vite/src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore.spec.ts +++ b/packages/vite/src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore.spec.ts @@ -13,7 +13,7 @@ describe('addViteTempFilesToGitIgnore', () => { // ASSERT expect(tree.read('.gitignore', 'utf-8')).toMatchInlineSnapshot(` ".idea - **/vite.config.*.timestamp*" + vite.config.*.timestamp*" `); }); @@ -33,7 +33,7 @@ describe('addViteTempFilesToGitIgnore', () => { expect(tree.read('.gitignore', 'utf-8')).toMatchInlineSnapshot(` ".idea - **/vite.config.*.timestamp*" + vite.config.*.timestamp*" `); }); @@ -47,7 +47,7 @@ describe('addViteTempFilesToGitIgnore', () => { // ASSERT expect(tree.read('.gitignore', 'utf-8')).toMatchInlineSnapshot( - `"**/vite.config.*.timestamp*"` + `"vite.config.*.timestamp*"` ); }); }); diff --git a/packages/vite/src/utils/add-vite-temp-files-to-gitignore.ts b/packages/vite/src/utils/add-vite-temp-files-to-gitignore.ts index 4d3217a7d34d4..e3d603042f112 100644 --- a/packages/vite/src/utils/add-vite-temp-files-to-gitignore.ts +++ b/packages/vite/src/utils/add-vite-temp-files-to-gitignore.ts @@ -1,7 +1,7 @@ import { stripIndents, Tree } from '@nx/devkit'; export function addViteTempFilesToGitIgnore(tree: Tree) { - let newGitIgnoreContents = `**/vite.config.*.timestamp*`; + let newGitIgnoreContents = `vite.config.*.timestamp*`; if (tree.exists('.gitignore')) { const gitIgnoreContents = tree.read('.gitignore', 'utf-8'); if (!gitIgnoreContents.includes(newGitIgnoreContents)) {