-
-
Notifications
You must be signed in to change notification settings - Fork 257
Closed
Description
What problem does this feature solve?
i want to use html-rspack-plugin's hooks, such as used by RsbuildHtmlPlugin:
getHTMLPlugin()
.getCompilationHooks(compilation)but it's diffcult to get html-rspack-plugin, because this plugin is prebundled
hack method is:
api.modifyRspackConfig(async (config, { appendPlugins }) => {
const HtmlPlugin = config.plugins?.find(
(item) => item?.constructor.name === 'HtmlRspackPlugin'
)?.constructor as typeof HtmlRspackPlugin;
appendPlugins(new InterpolateHtmlPlugin(HtmlPlugin, replacements));
});but it's not elegant
What does the proposed API look like?
in index.ts
export { getHTMLPlugin } from './pluginHelper';Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels