Skip to content

Font urls does not work when using sourceMap #296

Closed
@hoanguyen311

Description

@hoanguyen311

webpack configuration:

modules: {
    loaders: [{
        test: /\.scss$/,
        loader: ['style', 'css?sourceMap', 'postcss',
            'sass?sourceMap'
        ].join('!')
    }, {
        test: /\.(mp4|ogg|svg|eot|ttf|woff|woff2|jpg|png)$/,
        loader: 'file-loader'
    }]
}

styles/fonts.scss

@font-face {
  font-family : "foundation-icons";
  font-style  : normal;
  font-weight : normal;
  src         : url(foundation-icons.eot);
  src         : url(foundation-icons.eot?#iefix) format("embedded-opentype"),
                url(foundation-icons.woff) format("woff"),
                url(foundation-icons.ttf) format("truetype"),
                url(foundation-icons.svg#fontcustom) format("svg");
}

And the font icons doesn't work
screen shot 2016-07-03 at 17 45 28

It's ok after I removed sourceMap option of css-loader
screen shot 2016-07-03 at 17 47 26

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