UNPKG

react-native-node-api

Version:
17 lines 1.09 kB
import type { PluginObj, NodePath } from "@babel/core"; import { NamingStrategy, PathSuffixChoice } from "../path-utils"; export type PluginOptions = { /** * Controls how the path of the addon inside a package is transformed into a library name. * The transformation is needed to disambiguate and avoid conflicts between addons with the same name (but in different sub-paths or packages). * * As an example, if the package name is `my-pkg` and the path of the addon within the package is `build/Release/my-addon.node`: * - `"omit"`: Only the package name is used and the library name will be `my-pkg`. * - `"strip"` (default): Path gets stripped to its basename and the library name will be `my-pkg--my-addon`. * - `"keep"`: The full path is kept and the library name will be `my-pkg--build-Release-my-addon`. */ pathSuffix?: PathSuffixChoice; }; export declare function replaceWithRequireNodeAddon(p: NodePath, modulePath: string, naming: NamingStrategy): void; export declare function plugin(): PluginObj; //# sourceMappingURL=plugin.d.ts.map