Skip to content

Commit 6056dc9

Browse files
felixmosheungyeole
authored andcommitted
feat: connect hmr to localhost, with default port 3130
1 parent 572ea4b commit 6056dc9

File tree

1 file changed

+9
-0
lines changed
  • packages/rsbuild-plugin-web-extension/src

1 file changed

+9
-0
lines changed

packages/rsbuild-plugin-web-extension/src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ interface Options {
1010

1111
const pluginName = "rsbuild:plugin-web-extension";
1212

13+
const port = +(process.env.PORT || 3130);
14+
1315
export const pluginWebExtension = ({
1416
manifestPath,
1517
}: Options): RsbuildPlugin => ({
@@ -80,8 +82,15 @@ export const pluginWebExtension = ({
8082
js: "src/[name]",
8183
},
8284
},
85+
server: {
86+
port,
87+
},
8388
dev: {
8489
writeToDisk: true,
90+
client: {
91+
port,
92+
host: "localhost",
93+
},
8594
},
8695
});
8796
});

0 commit comments

Comments
 (0)