Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update webpack-dev-server configuration #217

Closed
alexeyr-ci1 opened this issue Nov 28, 2022 · 4 comments · Fixed by #276
Closed

Update webpack-dev-server configuration #217

alexeyr-ci1 opened this issue Nov 28, 2022 · 4 comments · Fixed by #276
Assignees
Milestone

Comments

@alexeyr-ci1
Copy link
Collaborator

alexeyr-ci1 commented Nov 28, 2022

  1. Not all keys in https://webpack.js.org/configuration/dev-server/ are supported in
    const devServerConfig = {
    devMiddleware: {
    publicPath
    },
    compress: devServer.compress,
    allowedHosts: devServer.allowed_hosts,
    host: devServer.host,
    port: devServer.port,
    https: devServer.https,
    hot: devServer.hmr,
    liveReload,
    historyApiFallback: { disableDotRule: true },
    headers: devServer.headers,
    static: {
    publicPath: contentBase
    }
    }
    if (devServer.static) {
    devServerConfig.static = { ...devServerConfig.static, ...devServer.static }
    }
    if (devServer.client) {
    devServerConfig.client = devServer.client
    }
    . Should we add support for the rest?
  2. The recommended value for allowed_hosts is auto, not all which we have by default. It shouldn't be changed in a patch version, but maybe in 6.6.0 or 7.0.0?
  3. https key on the Webpack side is deprecated in favor of server (which isn't currently supported on our side). Should we add support for it (even if we don't for other keys) and replace https in the default config?
@ahangarha
Copy link
Contributor

@justin808 Please check this issue. Maybe we can add this to the version 7 milestone.

@justin808
Copy link
Member

@ahangarha yes fix for 7.0

@justin808 justin808 added this to the v7 milestone Mar 29, 2023
@ahangarha
Copy link
Contributor

@justin808 I am working on this issue and I have some concerns.

I updated allowed_hosts and replaced https: false with server: http. These two changes are breaking ones, so the question is if we should provide backward compatibility? If yes, what is the best strategy?

I was also thinking if we could move this change to the next major release to reduce the number of breaking changes in version 7.

@ahangarha
Copy link
Contributor

Done in #276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants