Skip to content

Commit

Permalink
feat(vite): remove migration
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarini committed Nov 30, 2023
1 parent 03a4eb5 commit f4900a1
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 307 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default defineConfig({
// },
test: {
reportsDirectory: '../coverage/my-lib',
globals: true,
cache: { dir: '../node_modules/.vitest' },
environment: 'jsdom',
Expand Down Expand Up @@ -72,7 +71,6 @@ export default defineConfig({
// External packages that should not be bundled into your library.
external: ['react', 'react-dom', 'react/jsx-runtime'],
},
outDir: 'dist/my-lib',
},
test: {
Expand Down
5 changes: 0 additions & 5 deletions packages/vite/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@
"version": "17.2.0-beta.10",
"description": "Update vite config.",
"implementation": "./src/migrations/update-17-2-0/update-vite-config"
},
"add-vite-plugin": {
"version": "17.3.0-beta.0",
"description": "Add @nx/vite/plugin",
"implementation": "./src/migrations/update-17-2-0/add-vite-plugin"
}
},
"packageJsonUpdates": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export default defineConfig({
// External packages that should not be bundled into your library.
external: ['react', 'react-dom', 'react/jsx-runtime'],
},
outDir: 'dist/react-lib-nonb-jest',
},
});
"
Expand Down Expand Up @@ -94,7 +93,6 @@ export default defineConfig({
// External packages that should not be bundled into your library.
external: ['react', 'react-dom', 'react/jsx-runtime'],
},
outDir: 'dist/react-lib-nonb-jest',
},
test: {
Expand Down Expand Up @@ -170,7 +168,6 @@ export default defineConfig({
// External packages that should not be bundled into your library.
external: ['react', 'react-dom', 'react/jsx-runtime'],
},
outDir: 'dist/react-lib-nonb-vitest',
},
plugins: [
nxViteTsPaths(),
Expand Down
11 changes: 0 additions & 11 deletions packages/vite/src/generators/init/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,6 @@ export function createVitestConfig(tree: Tree) {
nxJson.namedInputs.production = Array.from(new Set(productionFileSet));
}

nxJson.targetDefaults ??= {};
nxJson.targetDefaults['@nx/vite:test'] ??= {};
nxJson.targetDefaults['@nx/vite:test'].cache ??= true;
nxJson.targetDefaults['@nx/vite:test'].inputs ??= [
'default',
productionFileSet ? '^production' : '^default',
];
nxJson.targetDefaults['@nx/vite:test'].options ??= {
passWithNoTests: true,
};

updateNxJson(tree, nxJson);
}

Expand Down
3 changes: 3 additions & 0 deletions packages/vite/src/generators/vitest/vitest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ describe('vitest generator', () => {
expect(config.targets['test']).toMatchInlineSnapshot(`
{
"executor": "@nx/vite:test",
"options": {
"reportsDirectory": "../../coverage/apps/my-test-react-app",
},
"outputs": [
"{options.reportsDirectory}",
],
Expand Down
223 changes: 0 additions & 223 deletions packages/vite/src/migrations/update-17-2-0/add-vite-plugin.spec.ts

This file was deleted.

31 changes: 0 additions & 31 deletions packages/vite/src/migrations/update-17-2-0/add-vite-plugin.ts

This file was deleted.

0 comments on commit f4900a1

Please sign in to comment.