import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'; import { defineConfig } from '@lynx-js/rspeedy'; import { pluginTypeCheck } from '@rsbuild/plugin-type-check'; export default defineConfig({ plugins: [pluginReactLynx(), pluginTypeCheck()], // web 环境用于在浏览器里跑(Lynx for Web),lynx 环境用于 LynxExplorer / 真机 environments: { web: {}, lynx: { output: { // 原生端没有「URL 前缀」概念,data URI 也不渲染(实测), // 所以把图片资源前缀指到 APK 的 assets:Fresco 的 LocalAssetFetchProducer 认这个 scheme。 assetPrefix: 'asset:///', }, }, }, server: { port: 3210, }, output: { filenameHash: false, distPath: { root: 'dist', }, }, });