UNPKG

extension-develop

Version:
28 lines (27 loc) 1.15 kB
import { type Compiler } from '@rspack/core'; import { type FilepathList, type PluginInterface } from '../../webpack-types'; import { type DevOptions } from '../../../module'; /** * ScriptsPlugin is responsible for handiling all possible JavaScript * (and CSS, for content_scripts) fields in manifest.json. It also * supports extra scripts defined via this.include option. These * extra scripts are added to the compilation and are also HMR * enabled. They are useful for adding extra scripts to the * extension runtime, like content_scripts via `scripting`, for example. * * Features supported: * - content_scripts.js - HMR enabled * - content_scripts.css - HMR enabled * - background.scripts - HMR enabled * - service_worker - Reloaded by chrome.runtime.reload() * - user_scripts.api_scripts - HMR enabled * - scripts via this.include - HMR enabled */ export declare class ScriptsPlugin { readonly manifestPath: string; readonly includeList?: FilepathList; readonly excludeList?: FilepathList; readonly browser?: DevOptions['browser']; constructor(options: PluginInterface); apply(compiler: Compiler): void; }