@karrotmarket/lynx-*-icon 패키지는 내부적으로
karrotmarket/assets-* 패키지의 SVG asset을 사용합니다. 아래 플러그인은 해당
package asset을 Lynx에서 안정적으로 표시할 수 있도록 빌드 시 sharp로 WebP
data URL 모듈로 변환합니다.
bun add --dev @seed-design/rsbuild-plugin-lynx-icon
package.json
lynx.config.ts
lynx.config.ts
import { defineConfig } from "@lynx-js/rspeedy";import { pluginQRCode } from "@lynx-js/qrcode-rsbuild-plugin";import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";import { pluginLynxIcon } from "@seed-design/rsbuild-plugin-lynx-icon";import { pluginTypeCheck } from "@rsbuild/plugin-type-check";export default defineConfig({ plugins: [ pluginQRCode({ schema(url) { // We use `?fullscreen=true` to open the page in LynxExplorer in full screen mode return `${url}?fullscreen=true`; }, }), pluginReactLynx(), pluginTypeCheck(), pluginLynxIcon({ include: /node_modules\/@karrotmarket\/assets-(monochrome|multicolor)\/svg\//, }), ],});