mirror of https://github.com/webpack/webpack.git
Merge pull request #14537 from webpack/bugfix/future-managed-paths
fix managed paths regexp handling
This commit is contained in:
commit
e498f04cc7
|
|
@ -1988,7 +1988,7 @@ class FileSystemInfo {
|
||||||
for (const managedPath of this.managedPathsRegExps) {
|
for (const managedPath of this.managedPathsRegExps) {
|
||||||
const match = managedPath.exec(path);
|
const match = managedPath.exec(path);
|
||||||
if (match) {
|
if (match) {
|
||||||
const managedItem = getManagedItem(managedPath[1], path);
|
const managedItem = getManagedItem(match[1], path);
|
||||||
if (managedItem) {
|
if (managedItem) {
|
||||||
managedItems.add(managedItem);
|
managedItems.add(managedItem);
|
||||||
managedSet.add(path);
|
managedSet.add(path);
|
||||||
|
|
@ -2962,7 +2962,7 @@ class FileSystemInfo {
|
||||||
for (const managedPath of this.managedPathsRegExps) {
|
for (const managedPath of this.managedPathsRegExps) {
|
||||||
const match = managedPath.exec(path);
|
const match = managedPath.exec(path);
|
||||||
if (match) {
|
if (match) {
|
||||||
const managedItem = getManagedItem(managedPath[1], path);
|
const managedItem = getManagedItem(match[1], path);
|
||||||
if (managedItem) {
|
if (managedItem) {
|
||||||
// construct timestampHash from managed info
|
// construct timestampHash from managed info
|
||||||
return this.managedItemQueue.add(managedItem, (err, info) => {
|
return this.managedItemQueue.add(managedItem, (err, info) => {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
import value from "package";
|
||||||
|
|
||||||
|
it("should work", () => {
|
||||||
|
expect(value).toBe(42);
|
||||||
|
});
|
||||||
1
test/configCases/managedPaths/futureDefaults/node_modules/package/index.js
generated
vendored
Normal file
1
test/configCases/managedPaths/futureDefaults/node_modules/package/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
export default 42;
|
||||||
4
test/configCases/managedPaths/futureDefaults/node_modules/package/package.json
generated
vendored
Normal file
4
test/configCases/managedPaths/futureDefaults/node_modules/package/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"name": "package",
|
||||||
|
"version": "1.0.0"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
/** @type {import("../../../../").Configuration} */
|
||||||
|
module.exports = {
|
||||||
|
experiments: {
|
||||||
|
futureDefaults: true
|
||||||
|
}
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue