Apply IE fix for Array.flat (https://github.com/woocommerce/woocommerce-admin/pull/6068)
* Use babel to compile debug package (https://github.com/woocommerce/woocommerce-admin/pull/5987) * replace [].flat() with written js Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
This commit is contained in:
parent
1a45ae2c0d
commit
6b0c5ecda1
|
@ -1,15 +1,18 @@
|
|||
const { babelConfig: e2eBabelConfig } = require( '@woocommerce/e2e-environment' );
|
||||
const {
|
||||
babelConfig: e2eBabelConfig,
|
||||
} = require( '@woocommerce/e2e-environment' );
|
||||
|
||||
module.exports = function( api ) {
|
||||
module.exports = function ( api ) {
|
||||
api.cache( true );
|
||||
|
||||
return {
|
||||
...e2eBabelConfig,
|
||||
presets: [
|
||||
...e2eBabelConfig.presets,
|
||||
'@wordpress/babel-preset-default',
|
||||
],
|
||||
plugins: [
|
||||
...e2eBabelConfig,
|
||||
presets: [
|
||||
...e2eBabelConfig.presets,
|
||||
'@wordpress/babel-preset-default',
|
||||
],
|
||||
sourceType: 'unambiguous',
|
||||
plugins: [
|
||||
/**
|
||||
* This allows arrow functions as class methods so that binding
|
||||
* methods to `this` in the constructor isn't required.
|
||||
|
|
|
@ -51,7 +51,9 @@ export class TaskList extends Component {
|
|||
|
||||
getUngroupedTasks() {
|
||||
const { tasks: groupedTasks } = this.props;
|
||||
return Object.values( groupedTasks ).flat();
|
||||
return Object.values( groupedTasks ).reduce( ( acc, task ) => {
|
||||
return acc.concat( task );
|
||||
}, [] );
|
||||
}
|
||||
|
||||
getSpecificTasks() {
|
||||
|
|
|
@ -117,7 +117,7 @@ const webpackConfig = {
|
|||
},
|
||||
{
|
||||
test: /\.js?$/,
|
||||
exclude: /node_modules/,
|
||||
exclude: /node_modules(\/|\\)(?!(debug))/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
|
|
Loading…
Reference in New Issue