Skip to content

Commit

Permalink
fix: webpack 5 issue with jest @lingui/loader #999
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Moreno committed Mar 14, 2021
1 parent dc7e640 commit 9e68a8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/loader/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const requiredType = "javascript/auto";
export default function (source) {
const options = loaderUtils.getOptions(this) || {}

if(isWebpack5) {
if(isWebpack5 && this._compilation) {
const LoaderDependency = require("webpack/lib/dependencies/LoaderDependency");
const factory = this._compilation.dependencyFactories.get(LoaderDependency);
if (factory === undefined) {
Expand Down

1 comment on commit 9e68a8d

@vercel
Copy link

@vercel vercel bot commented on 9e68a8d Mar 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.