import type { ExternalItem, ExternalsType } from '@rspack/core'; export type AllowlistItemFunction = (request: string) => boolean; export type AllowlistItem = string | RegExp | AllowlistItemFunction; export interface NodeExternalsOptions { /** * Method of importing requested module. * @default `module` */ importType?: ExternalsType; /** * Defines modules that should be included to bundle. * By default css-loader and `*.css` files allowed. */ allow?: AllowlistItem | AllowlistItem[]; } /** * Simple modern analogue of `webpack-node-externals`. * Marks all files from `node_modules` as externals. * @param options Options. * @returns Externals function. */ export declare function nodeExternals({ importType, allow, }?: NodeExternalsOptions): ExternalItem;