diff --git a/docs/angular/api-workspace/generators/library.md b/docs/angular/api-workspace/generators/library.md index 8d29f77b02..7ca32f42b0 100644 --- a/docs/angular/api-workspace/generators/library.md +++ b/docs/angular/api-workspace/generators/library.md @@ -90,6 +90,14 @@ Type: `boolean` Use pascal case file names. +### skipBabelrc + +Default: `false` + +Type: `boolean` + +Do not generate .babelrc file. Useful for Node libraries that are not compiled by Babel + ### skipFormat Default: `false` diff --git a/docs/node/api-workspace/generators/library.md b/docs/node/api-workspace/generators/library.md index 1f0f79e2a7..de7742b488 100644 --- a/docs/node/api-workspace/generators/library.md +++ b/docs/node/api-workspace/generators/library.md @@ -90,6 +90,14 @@ Type: `boolean` Use pascal case file names. +### skipBabelrc + +Default: `false` + +Type: `boolean` + +Do not generate .babelrc file. Useful for Node libraries that are not compiled by Babel + ### skipFormat Default: `false` diff --git a/docs/react/api-workspace/generators/library.md b/docs/react/api-workspace/generators/library.md index 1f0f79e2a7..de7742b488 100644 --- a/docs/react/api-workspace/generators/library.md +++ b/docs/react/api-workspace/generators/library.md @@ -90,6 +90,14 @@ Type: `boolean` Use pascal case file names. +### skipBabelrc + +Default: `false` + +Type: `boolean` + +Do not generate .babelrc file. Useful for Node libraries that are not compiled by Babel + ### skipFormat Default: `false` diff --git a/packages/gatsby/babel.ts b/packages/gatsby/babel.ts index 65f2393365..586b4362ef 100644 --- a/packages/gatsby/babel.ts +++ b/packages/gatsby/babel.ts @@ -4,6 +4,9 @@ module.exports = function (api, options) { api.assertVersion(7); return { - presets: [[require.resolve('babel-preset-gatsby'), { useBuiltIns: true }]], + presets: [ + '@nrwl/web/babel', + [require.resolve('babel-preset-gatsby'), { useBuiltIns: true }], + ], }; }; diff --git a/packages/gatsby/src/generators/application/application.spec.ts b/packages/gatsby/src/generators/application/application.spec.ts index 2b8e52c23e..544de6557d 100644 --- a/packages/gatsby/src/generators/application/application.spec.ts +++ b/packages/gatsby/src/generators/application/application.spec.ts @@ -181,13 +181,7 @@ describe('app', () => { .read('apps/my-app/src/pages/index.tsx') .toString(); - const babelJestConfig = readJson( - tree, - 'apps/my-app/babel-jest.config.json' - ); - expect(indexContent).toMatch(/