Skip to content

Commit

Permalink
fix(dev): 修复webpack下--host参数失效问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbowen01 committed Sep 15, 2023
1 parent 9e6da25 commit c6c175e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cli-dev/src/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const startServer = async (server: WebpackDevServer): Promise<void> => {
};

export const start = async (cmd: DevCommandLineArgs, serverContext: WebpackServerStartContext) => {
const {buildContext, host} = serverContext;
const {buildContext, host, publicPath} = serverContext;
const {hot, https} = buildContext.projectSettings.devServer;
const extra = await createWebpackDevServerPartial(buildContext, host);
const config = await createWebpackConfig(
Expand All @@ -35,7 +35,7 @@ export const start = async (cmd: DevCommandLineArgs, serverContext: WebpackServe
caseSensitiveModuleSource: cmd.strict,
typeCheck: false,
},
extras: [extra],
extras: [extra, {output: {publicPath}}],
}
);
const devServerConfig = await createWebpackDevServerConfig(
Expand Down

0 comments on commit c6c175e

Please sign in to comment.