File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/rsbuild-plugin-web-extension/src Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { makeManifest } from "./manifest/make-manifest.js";
44interface Options {
55 manifest : chrome . runtime . ManifestV3 ;
66}
7+
78export const pluginWebExtension = ( { manifest } : Options ) : RsbuildPlugin => ( {
89 name : "rsbuild:plugin-web-extension" ,
910 setup : async ( api ) => {
@@ -19,10 +20,12 @@ export const pluginWebExtension = ({ manifest }: Options): RsbuildPlugin => ({
1920 * @issue https://github.com/web-infra-dev/rspack/issues/5971
2021 * @ref https://github.com/webdiscus/html-bundler-webpack-plugin
2122 */
22- const entry = htmlEntryPoints . reduce ( ( acc , [ name , entry ] ) => {
23- acc [ name ] = entry ?. replace ( / \. h t m l $ / , ".tsx" ) ;
24- return acc ;
25- } , { } as Record < string , string | undefined > ) ;
23+ const entry = Object . fromEntries (
24+ htmlEntryPoints . map ( ( [ name , entry ] ) => [
25+ name ,
26+ entry ?. replace ( / \. h t m l $ / , ".tsx" ) ,
27+ ] )
28+ ) ;
2629
2730 api . modifyRspackConfig ( ( config , { mergeConfig, HtmlPlugin } ) => {
2831 return mergeConfig ( config , {
You can’t perform that action at this time.
0 commit comments