Skip to content

Commit

Permalink
Merge pull request #15663 from webpack/upgrade-enhanced-resolve
Browse files Browse the repository at this point in the history
up enhanced-resolve
  • Loading branch information
sokra committed Apr 14, 2022
2 parents d3a0f8d + 68f22ac commit a72548f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"acorn-import-assertions": "^1.7.6",
"browserslist": "^4.14.5",
"chrome-trace-event": "^1.0.2",
"enhanced-resolve": "^5.9.2",
"enhanced-resolve": "^5.9.3",
"es-module-lexer": "^0.9.0",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
Expand Down
1 change: 1 addition & 0 deletions test/configCases/resolve/fallback/#/a.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = 1;
5 changes: 5 additions & 0 deletions test/configCases/resolve/fallback/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ it("can fallback if the module does not exist", () => {
const one = require("./b/1");
expect(one).toBe(1);
});

it("# alias should work", () => {
const one = require("#/a");
expect(one).toBe(1);
});
3 changes: 3 additions & 0 deletions test/configCases/resolve/fallback/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ const path = require("path");
/** @type {import("../../../../").Configuration} */
module.exports = {
resolve: {
alias: {
"#": path.resolve(__dirname, "#")
},
fallback: {
"./b": path.resolve(__dirname, "a")
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2259,10 +2259,10 @@ enhanced-resolve@^4.0.0:
memory-fs "^0.5.0"
tapable "^1.0.0"

enhanced-resolve@^5.9.2:
version "5.9.2"
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.2.tgz#0224dcd6a43389ebfb2d55efee517e5466772dd9"
integrity sha512-GIm3fQfwLJ8YZx2smuHpBKkXC1yOk+OBEmKckVyL0i/ea8mqDEykK3ld5dgH1QYPNyT/lIllxV2LULnxCHaHkA==
enhanced-resolve@^5.9.3:
version "5.9.3"
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz#44a342c012cbc473254af5cc6ae20ebd0aae5d88"
integrity sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==
dependencies:
graceful-fs "^4.2.4"
tapable "^2.2.0"
Expand Down

0 comments on commit a72548f

Please sign in to comment.