Skip to content

Commit

Permalink
Merge pull request #14537 from webpack/bugfix/future-managed-paths
Browse files Browse the repository at this point in the history
fix managed paths regexp handling
  • Loading branch information
sokra committed Oct 20, 2021
2 parents 19ca23f + 217a0be commit e498f04
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/FileSystemInfo.js
Expand Up @@ -1988,7 +1988,7 @@ class FileSystemInfo {
for (const managedPath of this.managedPathsRegExps) {
const match = managedPath.exec(path);
if (match) {
const managedItem = getManagedItem(managedPath[1], path);
const managedItem = getManagedItem(match[1], path);
if (managedItem) {
managedItems.add(managedItem);
managedSet.add(path);
Expand Down Expand Up @@ -2962,7 +2962,7 @@ class FileSystemInfo {
for (const managedPath of this.managedPathsRegExps) {
const match = managedPath.exec(path);
if (match) {
const managedItem = getManagedItem(managedPath[1], path);
const managedItem = getManagedItem(match[1], path);
if (managedItem) {
// construct timestampHash from managed info
return this.managedItemQueue.add(managedItem, (err, info) => {
Expand Down
5 changes: 5 additions & 0 deletions test/configCases/managedPaths/futureDefaults/index.js
@@ -0,0 +1,5 @@
import value from "package";

it("should work", () => {
expect(value).toBe(42);
});

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

@@ -0,0 +1,6 @@
/** @type {import("../../../../").Configuration} */
module.exports = {
experiments: {
futureDefaults: true
}
};

0 comments on commit e498f04

Please sign in to comment.