Minor Changes
-
refactor: move exposure system to web-core (#1254)
THIS IS A BREAKING CHANGE
You'll need to upgrade your @lynx-js/web-elements to >= 0.8.0
For SSR and better performance, we moved the lynx's exposure system from web-element to web-core.
Before this commit, we create Intersection observers by creating HTMLElements.
After this commit, we will create such Intersection observers after dom stabled.
Also, the setInterval for exposure has been removed, now we use an on time lazy timer for such features.
Patch Changes
-
feat: add
napiModulesPath
to bundle napiModules into worker runtime. (#1134)Usage:
import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin'; import { defineConfig } from '@rsbuild/core'; export default defineConfig({ plugins: [ pluginWebPlatform({ // replace with your actual napi-modules file path napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'), }), ], });
napi-modules.ts
example:// index.napi-modules.ts export default { custom_module: function(NapiModules, NapiModulesCall) { return { async test(name) { console.log('CustomModule', NapiModules, NapiModulesCall); }, }; }, };
-
Updated dependencies [
7b75469
,224c653
]:- @lynx-js/offscreen-document@0.1.3
- @lynx-js/web-mainthread-apis@0.15.0
- @lynx-js/web-constants@0.15.0
- @lynx-js/web-worker-rpc@0.15.0