Skip to content

Commit

Permalink
Merge pull request #14663 from webpack/hotfix/14662
Browse files Browse the repository at this point in the history
fix #14662
  • Loading branch information
sokra committed Nov 5, 2021
2 parents 04640dc + 610d435 commit 707a6d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dependencies/CommonJsFullRequireDependency.js
Expand Up @@ -121,7 +121,7 @@ CommonJsFullRequireDependency.Template = class CommonJsFullRequireDependencyTemp
requireExpr =
dep.asiSafe === true
? `(${requireExpr}${access})`
: `${requireExpr}${access})`;
: `${requireExpr}${access}`;
}
}
source.replace(dep.range[0], dep.range[1] - 1, requireExpr);
Expand Down
3 changes: 3 additions & 0 deletions test/cases/parsing/asi/index.js
Expand Up @@ -41,5 +41,8 @@ it("should respect asi flag", () => {
return callme()
})()

;(donotcallme)
require("./b.json").prop

expect(getCount()).toBe(29)
});

0 comments on commit 707a6d3

Please sign in to comment.