UNPKG

webpack-browser-extension-html

Version:
41 lines (38 loc) 1.5 kB
import webpack from 'webpack'; import { H as HtmlPluginInterface } from './types-CzTGoNr0.js'; /** * HtmlPlugin is responsible for handling the HTML file * defined in the manifest.json. Static assets and CSS files * within the HTML file are added to the compilation. JS files * are added as webpack entrypoints. It also supports ecxtra * html files defined via this.include option. These extra * html files are added to the compilation and are also HMR * enabled. They are useful for adding extra pages to the * extension runtime that are not defined in manifest. * * The plugin also has a guard against recompiling entrypoints * at runtime, throwing an error if any of those files change. * * Features supported: * action.default_popup - HMR enabled * background.page - HMR enabled * chrome_settings_overrides.homepage - HMR enabled * chrome_url_overrides.newtab - HMR enabled * chrome_url_overrides.history - HMR enabled * chrome_url_overrides.bookmarks - HMR enabled * devtools_page - HMR enabled * options_ui.page - HMR enabled * page_action.default_popup - HMR enabled * sandbox.page - HMR enabled * side_panel.default_panel - HMR enabled * sidebar_action.default_panel - HMR enabled */ declare class HtmlPlugin { readonly manifestPath: string; readonly include?: string[]; readonly exclude?: string[]; constructor(options: HtmlPluginInterface); private parseIncludes; apply(compiler: webpack.Compiler): void; } export { HtmlPlugin as default };