20 lines
1.1 KiB
Markdown
20 lines
1.1 KiB
Markdown
# Framework integration
|
||
|
||
The current WRNexusJS component scanner always includes `packages/ui/components` and the application’s `app/components`. The installer therefore copies `Captcha.wrn` into `packages/ui/components/Captcha.wrn` while retaining the canonical package copy at `packages/captcha/components/Captcha.wrn`.
|
||
|
||
A future framework improvement can read component directories registered by plugins and pass them to `createRouter({ componentDirs })`. `captchaPlugin()` already exposes the package directory through configuration and plugin metadata, so the package is ready for that change without changing its public API.
|
||
|
||
The installer adds these TypeScript aliases:
|
||
|
||
```json
|
||
{
|
||
"@wrnexus/captcha": ["./packages/captcha/src/index.ts"],
|
||
"@wrnexus/captcha/server": ["./packages/captcha/src/server/index.ts"],
|
||
"@wrnexus/captcha/client": ["./packages/captcha/src/client/index.ts"],
|
||
"@wrnexus/captcha/plugin": ["./packages/captcha/src/plugin.ts"],
|
||
"@wrnexus/captcha/*": ["./packages/captcha/src/*"]
|
||
}
|
||
```
|
||
|
||
After installation, regenerate the UI component reference so `Captcha` appears in generated component documentation.
|