Skip to content

Allow paths replacement for webpack 5 #63

Open
@agoldis

Description

@agoldis

Webpack 5 has a simplified chunks loading mechanism via [__webpack_require__.l] (https://github.com/webpack/webpack/blob/4837c3ddb9da8e676c73d97460e19689dd9d4691/lib/RuntimeGlobals.js#L169)

monkey-patching this function would allow to create an override method like replaceSrcMethodName that accepts the original URL (and possibly more params).

The patch should via a different main template hook, because local-variables comes before __webpack_require__.l definition https://github.com/webpack/webpack/blob/4837c3ddb9da8e676c73d97460e19689dd9d4691/lib/MainTemplate.js#L241

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions