27 lines
509 B
JavaScript
27 lines
509 B
JavaScript
module.exports = function ( api ) {
|
|
api.cache( true );
|
|
|
|
return {
|
|
presets: [ '@wordpress/babel-preset-default' ],
|
|
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',
|
|
],
|
|
env: {
|
|
production: {
|
|
plugins: [
|
|
[
|
|
'@wordpress/babel-plugin-makepot',
|
|
{
|
|
output: 'languages/woocommerce-admin.po',
|
|
},
|
|
],
|
|
],
|
|
},
|
|
},
|
|
};
|
|
};
|