Skip to content

Commit

Permalink
fix: Added safety check on rule.loader access (#11)
Browse files Browse the repository at this point in the history
Added safety check on `rule.loader` access.

Co-authored-by: StopTaPE <[email protected]>
  • Loading branch information
shalevc1098 and shalevc1098 authored Dec 31, 2021
1 parent 89f911e commit 413b86f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/get-webpack-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports = function getWebpackTools(params = {}) {
const workspaces = getWorkspaces({ cwd });
function enableWorkspacesResolution(webpackConfig) {
const babelLoader = webpackConfig.module.rules[1].oneOf.find((rule) =>
rule.loader.includes("babel-loader")
rule.loader && rule.loader.includes("babel-loader")
);
babelLoader.include = Array.isArray(babelLoader.include)
? babelLoader.include
Expand Down

0 comments on commit 413b86f

Please sign in to comment.