diff --git a/packages/web/src/migrations/update-11-5-0/update-babel-config.spec.ts b/packages/web/src/migrations/update-11-5-0/update-babel-config.spec.ts index 584b2ec62be34..cb39f6f5363a2 100644 --- a/packages/web/src/migrations/update-11-5-0/update-babel-config.spec.ts +++ b/packages/web/src/migrations/update-11-5-0/update-babel-config.spec.ts @@ -33,6 +33,10 @@ describe('Migrate babel setup', () => { root: 'apps/app5', projectType: 'application', }, + app6: { + root: 'apps/app6', + projectType: 'application', + }, lib1: { root: 'libs/lib1', projectType: 'library', @@ -49,6 +53,7 @@ describe('Migrate babel setup', () => { app3: {}, app4: {}, app5: {}, + app6: {}, lib1: {}, }, }) @@ -72,6 +77,10 @@ describe('Migrate babel setup', () => { 'apps/app4/.babelrc', JSON.stringify({ presets: ['@nrwl/gatsby/babel'] }) ); + tree.write( + 'apps/app6/.babelrc', + JSON.stringify({ presets: ['@nrwl/next/babel'] }) + ); await updateBabelConfig(tree); @@ -97,6 +106,10 @@ describe('Migrate babel setup', () => { expect(tree.exists('apps/app5/.babelrc')).not.toBeTruthy(); + expect(readJson(tree, 'apps/app6/.babelrc')).toMatchObject({ + presets: ['@nrwl/next/babel'], + }); + expect(readJson(tree, 'libs/lib1/.babelrc')).toMatchObject({ presets: ['@nrwl/web/babel'], }); diff --git a/packages/web/src/migrations/update-11-5-0/update-babel-config.ts b/packages/web/src/migrations/update-11-5-0/update-babel-config.ts index d3a8a38c01205..1c3492c1c5e91 100644 --- a/packages/web/src/migrations/update-11-5-0/update-babel-config.ts +++ b/packages/web/src/migrations/update-11-5-0/update-babel-config.ts @@ -26,6 +26,7 @@ export async function updateBabelConfig(host: Tree) { (x) => x === '@nrwl/web/babel' || x === '@nrwl/react/babel' || + x === '@nrwl/next/babel' || x === '@nrwl/gatsby/babel' ) ) {