Turbopack: Replace heuristics for detecting manually-configured sass or babel loaders with less-fragile ones, configure rules as a vec and not a map (#83131)
- There was very fragile logic in the sass and babel loaders for trying to detect existing configuration and extend them. I've replaced this with some more advanced heuristics and a warning. See also: https://vercel.slack.com/archives/C03EWR7LGEN/p1756320263002989
- The old logic would break if you used any globs other than the *exact* ones that the code expected.
- Some of this was probably motivated by the map data structure used, which didn't allow duplicate globs as keys.
- The new logic tries to look for a combination of globs and/or loader names, and is only used to control a warning, not to change any behavior.
- Convert rules to a vec instead of a map. This lets us duplicate `glob` keys, which will make supporting the array syntax proposed in #82857 (not implemented there, will come later) easier. Eventually these get turned into an array anyways when `ModuleOptions::new()` is run.
- Remove the `OptionWebpackRules` wrapper type. We can just use an empty `Vec` to represent the `None` state, as they're logically equivalent, and an empty `Vec` requires zero heap allocations. This simplifies the code and reduces the number of cells we need to create.
- Add a couple experimental options for force-disabling the auto-configured babel and sass loaders, as an escape hatch. It seems pretty unlikely that many people will need this, so I'm not spending much time/effort on it. This at least seems better than the previous implicit check.
- This might be useful for somebody who wants to use a `babelrc` with webpack, but not with Turbopack.