Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Outputting [Object object] instead of URL for CSS file url functions #353

Closed
IronSean opened this issue Dec 23, 2019 · 1 comment
Closed

Comments

@IronSean
Copy link

  • Operating System: Windows 10
  • Node Version: v12.13.1
  • NPM Version: 6.12.1
  • webpack Version: 4.41.4
  • file-loader Version: 5.0.2

Expected Behavior

generate CSS like this (as it did in file-loader 4.x):

body {
    background: url(http://localhost:8080/dist/bce4508….png) #ffffff;
}

Actual Behavior

generates CSS as

body {
  background: url([object Module]) #ffffff;
}

Code

The use of file-loader is completely default currently, I'm working on a repro below as the whole webpack config is quite large.

How Do We Reproduce?

I'm working on a repro I can provide.

@alexander-akait
Copy link
Member

update css-loader to latest version, or you can disable ES module syntax using esModule: false

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants