搜索文档
Home > @lynx-js/qrcode-rsbuild-plugin > PluginQRCodeOptions > schema
Customize the generated schema.
Signature:
schema?: CustomizedSchemaFn | undefined;
import { pluginQRCode } from '@lynx-js/plugin-qrcode' import { defineConfig } from '@lynx-js/rspeedy' export default defineConfig({ plugins: [ pluginQRCode({ schema(url) { return `lynx://${url}?dev=1` }, }), ], })
You may press a in the terminal to switch between schemas.
a
import { pluginQRCode } from '@lynx-js/plugin-qrcode' import { defineConfig } from '@lynx-js/rspeedy' export default defineConfig({ plugins: [ pluginQRCode({ schema(url) { return { http: url, foo: `foo://lynx?url=${encodeURIComponent(url)}&dev=1`, bar: `bar://lynx?url=${encodeURIComponent(url)}`, } }, }), ], })