Skip to content

Problem loading a data-uri after updating to 2.0.0 #31

@jessegrosjean

Description

@jessegrosjean

Likely user error, but I can't seem to figure it out...

I just updated a number of packages, including updating the less-loader to version 2.0.0. In the process of doing those updates using a data-uri in my less file seems to have broke:

background-image: data-uri('image/svg+xml;charset=UTF-8', 'dropIndicator.svg');

When I do that I get this error message:

ERROR in ./~/css-loader!./~/less-loader!./src/birch/style/style.less
Module build failed: error evaluating function `data-uri`: Cannot 'resolveSync' because the fileSystem is not sync. Use 'resolve'!
 @ /Users/jesse/Dropbox/Projects:Hacks/Birch/src/birch/style/style.less (line 267, column 19)
 near lines:
    content: "";
    background-image: data-uri('image/svg+xml;charset=UTF-8', 'dropIndicator.svg');
    background-repeat: no-repeat;
 @ ./src/birch/style/style.less 4:14-246

Can someone tell me what must be done to fix the problem? I'm not sure what is meant by the "Use 'resolve'!" suggestion in the error message.

Thanks,
Jesse

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