github lynx-family/lynx-stack @lynx-js/web-platform-rsbuild-plugin@0.1.2

latest releases: @lynx-js/offscreen-document@0.1.4, @lynx-js/cache-events-webpack-plugin@0.0.2, @lynx-js/web-constants@0.16.0...
one month ago

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);
          },
        };
      },
    };

Don't miss a new lynx-stack release

NewReleases is sending notifications on new releases.