Skip to content

__webpack_public_path__ ignored in entry point when hot reloading using webpack-dev-server #1650

@noisecapella

Description

@noisecapella

The webpack documentation says, if you don't know publicPath when compiling you can specify __webpack_public_path__ in your entry point. __webpack_public_path__ becomes __webpack_require__.p in the webpack bundle. It appears that after hot reloading there are at least two copies of the function __webpack_require__ since the p property is only set on one of them. My hot reload is failing because whatever copy of __webpack_require__ it's using to hot reload doesn't have p set to the new value. If I set publicPath in webpack.config.js the reload works fine.

Does this sound correct? Thanks for any guidance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions