2019-05-06 12:44:58 +02:00
|
|
|
const withTests = {
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
'@babel/preset-env',
|
|
|
|
{ shippedProposals: true, useBuiltIns: 'usage', corejs: '3', targets: { node: 'current' } },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
'babel-plugin-require-context-hook',
|
|
|
|
'babel-plugin-dynamic-import-node',
|
|
|
|
'@babel/plugin-transform-runtime',
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
2018-11-09 09:46:31 +01:00
|
|
|
module.exports = {
|
2019-11-14 18:43:44 +08:00
|
|
|
ignore: [
|
|
|
|
'./lib/codemod/src/transforms/__testfixtures__',
|
|
|
|
'./lib/postinstall/src/__testfixtures__',
|
|
|
|
],
|
2018-11-19 17:21:53 +01:00
|
|
|
presets: [
|
2019-04-26 17:46:58 +02:00
|
|
|
['@babel/preset-env', { shippedProposals: true, useBuiltIns: 'usage', corejs: '3' }],
|
2018-12-28 01:39:01 +01:00
|
|
|
'@babel/preset-typescript',
|
2018-11-19 17:21:53 +01:00
|
|
|
'@babel/preset-react',
|
|
|
|
'@babel/preset-flow',
|
|
|
|
],
|
2018-11-09 09:46:31 +01:00
|
|
|
plugins: [
|
2019-04-04 19:51:28 +02:00
|
|
|
[
|
|
|
|
'@babel/plugin-proposal-decorators',
|
|
|
|
{
|
|
|
|
legacy: true,
|
|
|
|
},
|
|
|
|
],
|
2019-01-05 22:15:03 +01:00
|
|
|
['@babel/plugin-proposal-class-properties', { loose: true }],
|
2018-11-09 09:46:31 +01:00
|
|
|
'@babel/plugin-proposal-export-default-from',
|
2018-11-30 17:43:33 +01:00
|
|
|
'@babel/plugin-syntax-dynamic-import',
|
2019-03-02 20:33:20 +01:00
|
|
|
['@babel/plugin-proposal-object-rest-spread', { loose: true, useBuiltIns: true }],
|
2018-11-30 17:43:33 +01:00
|
|
|
'babel-plugin-macros',
|
2018-12-06 16:49:52 +01:00
|
|
|
['emotion', { sourceMap: true, autoLabel: true }],
|
2018-11-09 09:46:31 +01:00
|
|
|
],
|
|
|
|
env: {
|
2019-05-06 12:44:58 +02:00
|
|
|
test: withTests,
|
2018-11-09 09:46:31 +01:00
|
|
|
},
|
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
test: './examples/vue-kitchen-sink',
|
2018-12-04 13:26:34 +01:00
|
|
|
presets: ['babel-preset-vue'],
|
2019-05-06 12:44:58 +02:00
|
|
|
env: {
|
|
|
|
test: withTests,
|
|
|
|
},
|
2018-11-09 09:46:31 +01:00
|
|
|
},
|
2019-02-04 20:12:47 +01:00
|
|
|
{
|
|
|
|
test: './lib',
|
|
|
|
presets: [
|
2019-04-26 17:46:58 +02:00
|
|
|
['@babel/preset-env', { shippedProposals: true, useBuiltIns: 'usage', corejs: '3' }],
|
2019-02-04 20:12:47 +01:00
|
|
|
'@babel/preset-react',
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
['@babel/plugin-proposal-object-rest-spread', { loose: true, useBuiltIns: true }],
|
|
|
|
'@babel/plugin-proposal-export-default-from',
|
|
|
|
'@babel/plugin-syntax-dynamic-import',
|
|
|
|
['@babel/plugin-proposal-class-properties', { loose: true }],
|
|
|
|
'babel-plugin-macros',
|
|
|
|
['emotion', { sourceMap: true, autoLabel: true }],
|
|
|
|
'@babel/plugin-transform-react-constant-elements',
|
|
|
|
'babel-plugin-add-react-displayname',
|
|
|
|
],
|
2019-05-06 12:44:58 +02:00
|
|
|
env: {
|
|
|
|
test: withTests,
|
|
|
|
},
|
2019-02-04 20:12:47 +01:00
|
|
|
},
|
2018-11-09 09:46:31 +01:00
|
|
|
{
|
|
|
|
test: [
|
|
|
|
'./lib/node-logger',
|
|
|
|
'./lib/codemod',
|
|
|
|
'./addons/storyshots',
|
2019-07-20 21:48:30 +02:00
|
|
|
'**/src/server/**',
|
|
|
|
'**/src/bin/**',
|
2018-11-09 09:46:31 +01:00
|
|
|
],
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
'@babel/preset-env',
|
|
|
|
{
|
2018-12-04 16:27:02 +01:00
|
|
|
shippedProposals: true,
|
|
|
|
useBuiltIns: 'usage',
|
2018-11-09 09:46:31 +01:00
|
|
|
targets: {
|
|
|
|
node: '8.11',
|
|
|
|
},
|
2019-04-26 17:46:58 +02:00
|
|
|
corejs: '3',
|
2018-11-09 09:46:31 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
2019-01-05 22:15:03 +01:00
|
|
|
plugins: [
|
2019-03-02 21:00:28 +01:00
|
|
|
'emotion',
|
2019-01-05 22:15:03 +01:00
|
|
|
'babel-plugin-macros',
|
2020-04-02 23:22:04 +02:00
|
|
|
'@babel/plugin-transform-arrow-functions',
|
|
|
|
'@babel/plugin-transform-shorthand-properties',
|
|
|
|
'@babel/plugin-transform-block-scoping',
|
|
|
|
'@babel/plugin-transform-destructuring',
|
2019-01-05 22:15:03 +01:00
|
|
|
['@babel/plugin-proposal-class-properties', { loose: true }],
|
|
|
|
'@babel/plugin-proposal-object-rest-spread',
|
|
|
|
'@babel/plugin-proposal-export-default-from',
|
|
|
|
],
|
2019-05-06 12:44:58 +02:00
|
|
|
env: {
|
|
|
|
test: withTests,
|
|
|
|
},
|
2018-11-09 09:46:31 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|