Skip to content

Commit

Permalink
Merge branch 'next' into feature/react-jsx-detection-with-pnp
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Jun 30, 2022
2 parents e1e2599 + 10a87ce commit b29729e
Show file tree
Hide file tree
Showing 4,173 changed files with 222,341 additions and 100,636 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
29 changes: 22 additions & 7 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,25 @@ const withTests = {
],
],
plugins: [
'babel-plugin-require-context-hook',
'@storybook/babel-plugin-require-context-hook',
'babel-plugin-dynamic-import-node',
'@babel/plugin-transform-runtime',
],
};

const modules = process.env.BABEL_ESM === 'true' ? false : 'auto';
// type BabelMode = 'cjs' | 'esm' | 'modern';

const modules = process.env.BABEL_MODE === 'cjs' ? 'auto' : false;

// FIXME: optional chaining introduced in chrome 80, not supported by wepback4
// https://github.com/webpack/webpack/issues/10227#issuecomment-642734920
const targets = process.env.BABEL_MODE === 'modern' ? { chrome: '79' } : 'defaults';

module.exports = {
ignore: [
'./lib/codemod/src/transforms/__testfixtures__',
'./lib/postinstall/src/__testfixtures__',
'**/typings.d.ts',
],
presets: [
[
Expand All @@ -26,7 +33,7 @@ module.exports = {
shippedProposals: true,
useBuiltIns: 'usage',
corejs: '3',
targets: 'defaults',
targets,
modules,
},
],
Expand All @@ -43,11 +50,12 @@ module.exports = {
],
['@babel/plugin-proposal-class-properties', { loose: true }],
['@babel/plugin-proposal-private-methods', { loose: true }],
['@babel/plugin-proposal-private-property-in-object', { loose: true }],
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-syntax-dynamic-import',
['@babel/plugin-proposal-object-rest-spread', { loose: true, useBuiltIns: true }],
'babel-plugin-macros',
['emotion', { sourceMap: true, autoLabel: true }],
['@emotion', { sourceMap: true, autoLabel: 'always' }],
],
env: {
test: withTests,
Expand All @@ -70,7 +78,7 @@ module.exports = {
useBuiltIns: 'usage',
corejs: '3',
modules,
targets: 'defaults',
targets,
},
],
'@babel/preset-react',
Expand All @@ -79,9 +87,10 @@ module.exports = {
['@babel/plugin-proposal-object-rest-spread', { loose: true, useBuiltIns: true }],
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-syntax-dynamic-import',
['@babel/plugin-proposal-private-property-in-object', { loose: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
'babel-plugin-macros',
['emotion', { sourceMap: true, autoLabel: true }],
['@emotion', { sourceMap: true, autoLabel: 'always' }],
'babel-plugin-add-react-displayname',
],
env: {
Expand All @@ -91,6 +100,11 @@ module.exports = {
{
test: [
'./lib/node-logger',
'./lib/core',
'./lib/core-common',
'./lib/core-server',
'./lib/builder-webpack4',
'./lib/builder-webpack5',
'./lib/codemod',
'./addons/storyshots',
'**/src/server/**',
Expand All @@ -111,12 +125,13 @@ module.exports = {
],
],
plugins: [
'emotion',
'@emotion',
'babel-plugin-macros',
'@babel/plugin-transform-arrow-functions',
'@babel/plugin-transform-shorthand-properties',
'@babel/plugin-transform-block-scoping',
'@babel/plugin-transform-destructuring',
['@babel/plugin-proposal-private-property-in-object', { loose: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-proposal-export-default-from',
Expand Down
16 changes: 0 additions & 16 deletions .bettercodehub.yml

This file was deleted.

Loading

0 comments on commit b29729e

Please sign in to comment.