mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-03 02:21:05 +08:00
Prior to this change, the generated CSS files would show up un "no domain" in DevTools-on-DevTools, rather than in the correct paths (next to the source code). This is because we inject the CSS via `<style>` tags (or in some cases still adopt them to the shadow root), and put a relative path into the `sourceURL` annotation. DevTools-on-DevTools is not able to reconstruct the proper URL in these cases, because it doesn't know the contextual base URL. With this change, we use `import.meta` to construct the proper URL at the time when importing the `.css.js` file, and stick that into the `sourceURL` annotation. Bug: 391381439 Change-Id: Ia965faa19d5119a2f70f840cf20d8d5b914856d7 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6221305 Commit-Queue: Alex Rudenko <alexrudenko@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Looking for information on how the DevTools build system works? See scripts/build/ninja/README.md.