woocommerce/plugins/woocommerce-admin/babel.config.js

35 lines
647 B
JavaScript

module.exports = function( api ) {
api.cache( true );
return {
presets: [ '@wordpress/babel-preset-default' ],
plugins: [
'@babel/plugin-transform-async-to-generator',
'transform-class-properties',
[ '@babel/transform-react-jsx', {
pragma: 'createElement',
} ],
[
'@wordpress/babel-plugin-import-jsx-pragma',
{
scopeVariable: 'createElement',
source: '@wordpress/element',
isDefault: false,
},
],
],
env: {
production: {
plugins: [
[
'@wordpress/babel-plugin-makepot',
{
output: 'languages/woocommerce-admin.pot',
},
],
],
},
},
};
};