2021-01-13 21:01:35 +00:00
|
|
|
const {
|
|
|
|
babelConfig: e2eBabelConfig,
|
|
|
|
} = require( '@woocommerce/e2e-environment' );
|
2020-09-04 02:31:09 +00:00
|
|
|
|
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
|
|
|
...e2eBabelConfig,
|
|
|
|
presets: [
|
|
|
|
...e2eBabelConfig.presets,
|
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',
|
|
|
|
],
|
2018-10-24 21:17:23 +00:00
|
|
|
env: {
|
|
|
|
production: {
|
|
|
|
plugins: [
|
|
|
|
[
|
|
|
|
'@wordpress/babel-plugin-makepot',
|
|
|
|
{
|
2019-12-30 13:38:20 +00:00
|
|
|
output: 'languages/woocommerce-admin.po',
|
2018-10-24 21:17:23 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|