38 lines
660 B
JavaScript
38 lines
660 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.po',
|
|
},
|
|
],
|
|
],
|
|
},
|
|
},
|
|
};
|
|
};
|