Skip to content

Webpack 5.1.3 and PublicPath auto #95

Open
@Magi-KS

Description

@Magi-KS

Webpack: 5.1.3
extract-loader: 5.1.0

there's this PR webpack/webpack#11258 that was merged and released as part of Webpack 5.1.3 which changes the default publicPath option to auto.

and getPublicPath function that refers to the variable in this line

which result in require("./assets/styles/style.css") being resolved to <link rel="stylesheet" href="autoad70c8b2da42929dc855c3fd20c749b2.css"/>\n'

notice the auto.

I personally do not have any context on how this should be properly handled for extract-loader.
If any veteran would provide a direction I can make the changes and submit a PR.

for people that needs a quick fix, just explicitly provide the option of publicPath as empty string like so

          {
            loader: "extract-loader",
            options: {
              publicPath: "",
            }
          },

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