diff --git a/_scripts/webpack.renderer.config.js b/_scripts/webpack.renderer.config.js index 12a408bf..bd7431af 100644 --- a/_scripts/webpack.renderer.config.js +++ b/_scripts/webpack.renderer.config.js @@ -163,6 +163,12 @@ if (isDevMode) { processLocalesPlugin, new webpack.DefinePlugin({ 'process.env.LOCALE_NAMES': JSON.stringify(processLocalesPlugin.localeNames) + }), + // webpack doesn't get rid of js-yaml even though it isn't used in the production builds + // so we need to manually tell it to ignore any imports for `js-yaml` + new webpack.IgnorePlugin({ + resourceRegExp: /^js-yaml$/, + contextRegExp: /i18n$/ }) ) } diff --git a/_scripts/webpack.web.config.js b/_scripts/webpack.web.config.js index 1aa474a4..86c43f3a 100644 --- a/_scripts/webpack.web.config.js +++ b/_scripts/webpack.web.config.js @@ -189,6 +189,12 @@ if (isDevMode) { }, }, ] + }), + // webpack doesn't get rid of js-yaml even though it isn't used in the production builds + // so we need to manually tell it to ignore any imports for `js-yaml` + new webpack.IgnorePlugin({ + resourceRegExp: /^js-yaml$/, + contextRegExp: /i18n$/ }) ) }