Skip to content

[Bug] Error: Unsupported source map encoding charset=utf8;base64 #13

Closed
@ericnoguchi

Description

@ericnoguchi

I using gulp sass and In node_modules\scss-tokenizer\lib\previous-map.js
the below function breaks when encoding is data:application/json;charset=utf8;base64

This issue stops the whole build process

    PreviousMap.prototype.decodeInline = function decodeInline(text) {
        var uri = 'data:application/json,';
        var base64 = 'data:application/json;base64,';

        if (this.startWith(text, uri)) {
            return decodeURIComponent(text.substr(uri.length));
        } else if (this.startWith(text, base64)) {
            return _jsBase.Base64.decode(text.substr(base64.length));
        } else {
            var encoding = text.match(/data:application\/json;([^,]+),/)[1];
            throw new Error('Unsupported source map encoding ' + encoding);
        }
    };

Maybe a fix similar to postcss/postcss@215ed88

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions