Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix format assumption when resolving module dependencies (#10878)
* fix assumption when resolving dependencies When resolving dependencies given a path, we are only interested relative files from the current file. We are not interested in the dependencies that are listed in your `package.json` and thus in your `node_modules` folder. We made the assumption that your imports have at least 3 characters. This sort of makes sense because there will be a `.`, then the OS separator like `/` and than a file name. E.g.: `./a` is the minimal amount of characters. This makes sense for `import` statements, but in the case of `require`, it is totally valid to write `require('.')`. This will require the current `index.{js,ts,mjs,cjs,...}` in the current directory. Before this change, having a `require('.')` wouldn't crash, but the dependency would not be marked as a module dependencies and therefore we won't listen for file changes for that dependency. * update changelog
- Loading branch information