webpack-contrib / style-loader

Style Loader
MIT License
1.65k stars 473 forks source link

webpack 5 is returning a object instead URL #610

Closed ar-IGT closed 8 months ago

ar-IGT commented 1 year ago

Bug report

webpack 5 dev server is returning broken URL (http://localhost:9000/[object%20Object]) in address bar for proper HTML file path

Actual Behavior

When I click on any HTML file (e.g. http://localhost:9000/some_file.html) presented on default files listing webpage (http://localhost:9000 or http://localhost:9000/webpack-dev-server), prepared by webpack devserver, I get redirected to error webpage with broken URL: http://localhost:9001/[object%20Object]. And this what is shown in viewport: Cannot GET /[object%20Object].

Expected Behavior

It should redirect me to the proper HTML file, after clicking the URL, and the proper URL itself should appear in address bar.

How Do We Reproduce?

It's proprietary code, so it would be hard to post any actual scripts or themes code.

alexander-akait commented 1 year ago

Sorry without a reproducible example I can't help, no need to share proprietary code, just create a github repo, put webpack configuration file and an example of a code where we can reproduce it your problem, I think you have a problem in your configuration

alexander-akait commented 8 months ago

Closing due to inactivity. Please test with latest version and feel free to reopen if still regressions. Thanks!