Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cross-platform issue when loading nested files (#2730)
- nested files would be given incorrect names in the webpack manifest - for instance, a file like `images/icons/a.svg` would end up at `icons/a.svg`, but a file like `images/b.svg` would end up at `images/b.svg` (correctly) - webpacker.yml config files generally follow a POSIX path naming convention (so source_path might be something like 'app/javascript') - the webpacker file loader config checks to see if a given file is in the source path by calling `includes` and passing the source path - on Windows, the file names resolve to strings with backslashes as separators, but the source path has a forward slash - the issue *could* be fixed by just changing the .yml file to have a backslash for the source path, but it would then break on POSIX systems - instead, we check that the *normalized* source path is contained within the file, which fixes the issue
- Loading branch information