Skip to content

assignment to __webpack_public_path__ not replaced #551

@also

Description

@also

I'm trying to assign __webpack_public_path__ to a non-constant: an identifier, not a string.

I have the line

// elsewhere, outside of webpack, window.publicUrl = '//cdn.com/'
__webpack_public_path__ = window.publicUrl;

This is not replaced by webpack. If I change it to

__webpack_public_path__ = getPublicUrl();

it is replaced.

It is inconvenient to have to use a function on the RHS.

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