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

35 lines
638 B
JavaScript
Raw Normal View History

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/wc-admin.pot',
},
],
],
},
},
};
};