webpack-deduplication-plugin icon indicating copy to clipboard operation
webpack-deduplication-plugin copied to clipboard

Does not work in Windows

Open JasonGore opened this issue 2 years ago • 0 comments

fast-glob dropped support for backslashes as of 3.0. Since webpack-deduplication-plugin requires fast-glob 3.2.2, this prevents the plugin from working correctly in Windows. No package.json files will ever be globbed, and therefore no duplicates can be identified.

I had to fork the plugin code to fix. Either of the fixes will work:

  1. Ensuring globPath is normalized to forward slashes before calling glob.sync
  2. Using glob with code as-is instead of fast-glob (with the corresponding perf hit)

JasonGore avatar Jul 18 '22 22:07 JasonGore