Files
wehub-resource-sync da10c3c2c3
Publish Any Commit / build (22) (push) Failing after 1s
Build Extension / build (push) Failing after 1s
chore: import upstream snapshot with attribution
2026-07-13 12:20:35 +08:00

964 B

Astro Guide

As a script tag

Add the script tag to your root layout.

Refer to the CDN Guide for the available URLs.

<!doctype html>
<html lang="en">
  <head>
    <script is:inline src="https://unpkg.com/react-scan/dist/auto.global.js" />

    <!-- rest of your scripts go under -->
  </head>
  <body>
    <!-- ... -->
  </body>
</html>

As a module import

Add the script to your root layout

<!doctype html>
<html lang="en">
  <head>
    <script>
      import { scan } from 'react-scan';

      scan({
        enabled: true,
      });
    </script>
    <!-- rest of your scripts go under -->
  </head>
  <body>
    <!-- ... -->
  </body>
</html>

If you want react-scan to also run in production, use the react-scan/all-environments import path

- import { scan } from "react-scan";
+ import { scan } from "react-scan/all-environments";