Skip to content

Commit

Permalink
Webpack config: do not build chart.js library
Browse files Browse the repository at this point in the history
  • Loading branch information
igorschoester committed Apr 12, 2024
1 parent 93f73fd commit 40dc72a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions config/webpack/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ const { yoastExternals } = require( "./externals" );
let analyzerPort = 8888;

module.exports = function( { entry, output, combinedOutputFile, cssExtractFileName } ) {
const exclude = /node_modules[/\\](?!(chart.js)[/\\]).*/;
// The index of the babel-loader rule.
let ruleIndex = 0;
if ( process.env.NODE_ENV !== "production" ) {
ruleIndex = 1;
defaultConfig.module.rules[ 0 ].exclude = [ exclude ];
}
defaultConfig.module.rules[ ruleIndex ].exclude = exclude;

return {
...defaultConfig,
optimization: {
Expand Down

0 comments on commit 40dc72a

Please sign in to comment.