2020-09-04 02:31:09 +00:00
|
|
|
const { babelConfig: e2eBabelConfig } = require( '@woocommerce/e2e-environment' );
|
|
|
|
|
|
|
|
module.exports = function( api ) {
|
2018-10-24 21:17:23 +00:00
|
|
|
api.cache( true );
|
|
|
|
|
|
|
|
return {
|
2020-09-04 02:31:09 +00:00
|
|
|
...e2eBabelConfig,
|
|
|
|
presets: [
|
|
|
|
...e2eBabelConfig.presets,
|
|
|
|
'@wordpress/babel-preset-default',
|
|
|
|
],
|
|
|
|
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
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|