Skip to content

Commit 0921a63

Browse files
committed
revert: port, host
1 parent ac62ddf commit 0921a63

File tree

1 file changed

+13
-1
lines changed
  • packages/rsbuild-plugin-web-extension/src

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ interface Options {
77

88
const pluginName = "rsbuild:plugin-web-extension";
99

10+
const port = +(process.env.PORT || 3130);
11+
1012
export const pluginWebExtension = ({ manifest }: Options): RsbuildPlugin => ({
1113
name: pluginName,
1214
setup: async (api) => {
@@ -31,6 +33,10 @@ export const pluginWebExtension = ({ manifest }: Options): RsbuildPlugin => ({
3133

3234
api.modifyRspackConfig((config, { mergeConfig, HtmlPlugin }) => {
3335
return mergeConfig(config, {
36+
output: {
37+
hotUpdateChunkFilename: "hot/[id].[fullhash].hot-update.js", // this points to where hmr files will be saved
38+
hotUpdateMainFilename: "hot/[runtime].[fullhash].hot-update.json", // this points to where hmr files will be saved
39+
},
3440
plugins: htmlEntryPoints.map(([name, template]) => {
3541
return new HtmlPlugin({
3642
chunks: [name],
@@ -61,8 +67,14 @@ export const pluginWebExtension = ({ manifest }: Options): RsbuildPlugin => ({
6167
js: "src/[name]",
6268
},
6369
},
64-
70+
server: {
71+
port,
72+
},
6573
dev: {
74+
client: {
75+
port,
76+
host: "localhost",
77+
},
6678
writeToDisk: true,
6779
},
6880
});

0 commit comments

Comments
 (0)