Skip to content
This repository was archived by the owner on Jul 13, 2021. It is now read-only.
This repository was archived by the owner on Jul 13, 2021. It is now read-only.

Duplicated “single” runtime #88

@MatTheCat

Description

@MatTheCat
  • Operating System: Alpine 3.7.0
  • Node Version: 10.6.0
  • NPM Version: 6.1.0
  • webpack Version: 4.15.1
  • webpack-hot-client Version: 4.1.1

Expected Behavior

When optimization.runtimeChunk is single the client script should be injected in the runtime only.

Actual Behavior

The client script is injected in the runtime then the runtime is injected in the entrypoint. Also HMR doesn't work without allEntries: true; not sure if it's normal.

EDIT: it's normal I just didn't understand I needed it in my case.

Code

webpack.config.js

https://gist.github.com/MatTheCat/2e11f1ddbdf8bee2663fa2a5d2a227a2

serve.config.js

module.exports = {
  clipboard: false,
  devMiddleware: {
    publicPath: '/pattern-library/dist/'
  },
  hotClient: {
    host: {
      client: '*',
      server: 'webpack'
    },
    port: {
      client: +process.env.WEBPACK_HOT_PORT,
      server: 8081
    }
  },
  host: '0.0.0.0'
}

How Do We Reproduce?

Enable webpack-hot-client with optimization.runtimeChunk = 'single'.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions