2021-01-13 21:01:35 +00:00
|
|
|
module.exports = function ( api ) {
|
2018-10-24 21:17:23 +00:00
|
|
|
api.cache( true );
|
|
|
|
|
|
|
|
return {
|
2021-01-13 21:01:35 +00:00
|
|
|
presets: [
|
2023-08-16 00:15:03 +00:00
|
|
|
[
|
|
|
|
'@babel/preset-env',
|
|
|
|
{
|
|
|
|
targets: {
|
|
|
|
node: 'current',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2021-03-17 19:22:09 +00:00
|
|
|
'@babel/preset-typescript',
|
2021-01-13 21:01:35 +00:00
|
|
|
'@wordpress/babel-preset-default',
|
|
|
|
],
|
|
|
|
sourceType: 'unambiguous',
|
|
|
|
plugins: [
|
2020-08-23 21:35:46 +00:00
|
|
|
/**
|
|
|
|
* This allows arrow functions as class methods so that binding
|
|
|
|
* methods to `this` in the constructor isn't required.
|
|
|
|
*/
|
|
|
|
'@babel/plugin-proposal-class-properties',
|
|
|
|
],
|
2022-03-04 04:01:16 +00:00
|
|
|
ignore: [ 'packages/**/node_modules' ],
|
2018-10-24 21:17:23 +00:00
|
|
|
env: {
|
2022-04-08 04:35:00 +00:00
|
|
|
production: {},
|
2018-10-24 21:17:23 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|