next.js
704c1531 - babel-loader: Fix a few issues with config caching (#83973)

Commit
310 days ago
babel-loader: Fix a few issues with config caching (#83973) - `isReactCompilerRequired` needs to be called in `getCacheCharacteristics`, not in `getFreshConfig` because it depends on the file contents, so we don't want to cache the result of `isReactCompilerRequired`. - Moving react compiler detection outside of the cache lets us avoid using the full file path for a cache key (which negates much of the benefit of the cache). - `getFreshConfig` shouldn't use the real file path or source map, those should always be injected later. - It doesn't look like we were updating `inputSourceMap` on cached config objects (!?!?)
Author
bgw bgw
Parents
Loading