import type { RspackPluginFunction, RuleSetRule } from '@rspack/core'; import type { RuleInsertOptions } from './types.ts'; export interface PluginRawImportOptions extends RuleInsertOptions { /** Allows to use `with { type: 'text' }` to import file source as string. */ byImportAttr?: boolean | { /** Rule extend/override. */ ruleOverride?: RuleSetRule; }; /** Allows to use `?raw` query to import file source as string. */ byQuery?: boolean | { /** Rule extend/override. */ ruleOverride?: RuleSetRule; }; } /** * Rspack plugin that that allows importing files as a string (`with { type: 'text' }` or by `?raw` query). * By query logic is analogue of `raw-loader` that adds rule with `resourceQuery` and `type: 'asset/source'`. * By default it uses `?raw` query so every file can be imported as string with this query. * @param options Options. * @returns Plugin function. */ export declare function pluginRawImport({ byImportAttr, byQuery, ruleInsert, }?: PluginRawImportOptions): RspackPluginFunction;