Skip to content
This repository was archived by the owner on Aug 28, 2026. It is now read-only.
This repository was archived by the owner on Aug 28, 2026. It is now read-only.

css?sourceMap makes images disappear... #216

Closed

Description

@eyalw

my config:

       {
        test: /\.scss$/,
        loaders: ['style', 'css?sourceMap', 'postcss', 'sass?sourceMap&sourceMapContents'],
      },
      {
        test: /\.(png|jpg)$/,
        loader: 'url?limit=25000',
      },

and I have a scss file containing background-image: url('./invision.png');

Problem

I found those urls when clicking "open in a new tab" in the style panel in Chrome dev tools.

obviously the image doesn't show on the DOM when I use sourcemap....

Activity

  1. Darkside73 commented on Jan 14, 2016

    @Darkside73

    You should use absolute url in publicPath option. See discussion here webpack/style-loader#55

  2. bebraw commented on Mar 18, 2017

    @bebraw
    Contributor

    Yeah, you should set up publicPath to an absolute url as mentioned. Time to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions