Skip to content

webpack 服务是否可以支持https #250

@zoe1874

Description

@zoe1874
  • Node Version: 11.14.0
  • Beidou Version: 最新版本

webpack devServer 服务想支持 https 配置,我在 config 的 devServer 中配置了相应的 https 配置,但是实际在beidou-webpack插件中做转发的时候,写死了http, 导致实际没有符合预期。

是否可以在 beidou-webpack/app/middleware/webpack.js 中支持根据传入的配置生成转发地址,比如:

    const { devServer: { https = false } } = options
    const originUrl = `${https ? 'https://' : 'http://'}${ctx.host}${ctx.request.url}`;
    const url = new URL(originUrl);
    url.set('port', app.webpackServerPort);
    const webpackUrl = url.href;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions