2020-07-28 02:32:58 +00:00
|
|
|
module.exports = function ( api ) {
|
2018-10-24 21:17:23 +00:00
|
|
|
api.cache( true );
|
|
|
|
|
|
|
|
return {
|
|
|
|
presets: [ '@wordpress/babel-preset-default' ],
|
2020-08-23 21:35:46 +00:00
|
|
|
plugins: [
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|