From fdbb6be37f2cad8a4507c9efa4469b8a79b9dd3a Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Tue, 27 Sep 2022 15:38:08 +0800 Subject: [PATCH] Fix Tour Kit stories loading error (#34831) * Exclude debug module from webpack transpile to load tour kit stories We originally added debug module in https://github.com/woocommerce/woocommerce-admin/pull/5987 to fix a IE11 issue. Since we've drop IE11 support, it should be fine to remove it. * Add changelog --- plugins/woocommerce-admin/webpack.config.js | 8 ++++---- .../changelog/dev-34753-tour-kit-stories-error | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 plugins/woocommerce/changelog/dev-34753-tour-kit-stories-error diff --git a/plugins/woocommerce-admin/webpack.config.js b/plugins/woocommerce-admin/webpack.config.js index f6792840dab..0fd64f68f1d 100644 --- a/plugins/woocommerce-admin/webpack.config.js +++ b/plugins/woocommerce-admin/webpack.config.js @@ -5,8 +5,8 @@ const { get } = require( 'lodash' ); const path = require( 'path' ); const CopyWebpackPlugin = require( 'copy-webpack-plugin' ); const CustomTemplatedPathPlugin = require( '@wordpress/custom-templated-path-webpack-plugin' ); -const BundleAnalyzerPlugin = require( 'webpack-bundle-analyzer' ) - .BundleAnalyzerPlugin; +const BundleAnalyzerPlugin = + require( 'webpack-bundle-analyzer' ).BundleAnalyzerPlugin; const MomentTimezoneDataPlugin = require( 'moment-timezone-data-webpack-plugin' ); const ForkTsCheckerWebpackPlugin = require( 'fork-ts-checker-webpack-plugin' ); @@ -104,8 +104,8 @@ const webpackConfig = { amd: false, }, exclude: [ - // Exclude node_modules/.pnpm but not node_modules/.pnpm/debug* - /node_modules(\/|\\)\.pnpm(\/|\\)(?!(debug))/, + // Exclude node_modules/.pnpm + /node_modules(\/|\\)\.pnpm(\/|\\)/, ], use: { loader: 'babel-loader', diff --git a/plugins/woocommerce/changelog/dev-34753-tour-kit-stories-error b/plugins/woocommerce/changelog/dev-34753-tour-kit-stories-error new file mode 100644 index 00000000000..ac573d734a5 --- /dev/null +++ b/plugins/woocommerce/changelog/dev-34753-tour-kit-stories-error @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +Exclude "debug" module from babel compile to fix the tour kit stories loading error