File tree 2 files changed +5
-0
lines changed
packages/vite-plugin-react-scan
2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ pnpm add -D @react-scan/vite-plugin-react-scan react-scan
15
15
yarn add -D @react-scan/vite-plugin-react-scan react-scan
16
16
```
17
17
18
+ > ** Note:** Make sure ` react-scan ` is installed as a peer dependency. The plugin will automatically locate it in your project's dependency tree.
19
+
18
20
## Usage
19
21
20
22
Add the plugin to your ` vite.config.ts ` :
Original file line number Diff line number Diff line change @@ -293,6 +293,9 @@ const reactScanPlugin = (options: ReactScanPluginOptions = {}): Plugin => {
293
293
log . debug ( 'Emitted react-scan as asset:' , assetFileName ) ;
294
294
} catch ( error ) {
295
295
log . error ( 'Failed to process react-scan:' , error ) ;
296
+ throw new Error (
297
+ `Module ${ REACT_SCAN_IDENTIFIER } not found. Please ensure react-scan is installed as a peer dependency.`
298
+ ) ;
296
299
}
297
300
}
298
301
} ,
You can’t perform that action at this time.
0 commit comments