Skip to content

global transform breaks everything #35

@wenbing

Description

@wenbing

I'm using browserify build my bundle-xxx.js.

but when use css-modulesify plugin, it add a global transform, causes something like brfs broken.

because when global transform is after the local transform. brfs as a local transform is priority to the css-modulesify global transform.

while brfs parses the .css file, it throws a SyntaxError.

function getTransforms (pkg, opts) {
    var trx = [];
    if (opts.transformKey) {
        var n = pkg;
        var keys = opts.transformKey;
        for (var i = 0; i < keys.length; i++) {
            if (n && typeof n === 'object') n = n[keys[i]];
            else break;
        }
        if (i === keys.length) {
            trx = [].concat(n).filter(Boolean);
        }
    }
    return trx.concat(opts.globalTransform || []);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions