Skip to content

Variable map is always overwritten by local vars #38

@aaronj1335

Description

@aaronj1335

@necolas the other day in https://gitter.im/webpack/webpack you suggested using a global variable map as a workaround for full-blown variable parsing on individual CSS modules (wish i could link to the convo, but it was around Sept 8th at ~11 AM PST).

it was pretty straitforward to implement, as you suggested, but the global variables are overwritten by the local defaults, which is a problem when working with suitcss-style packages, because they usually define local defaults.

does any of that make sense?

one proposal would be to provide another config flag to rework-vars that specifies whether the map is overwritten or not. another would be to accept a function that resolves the conflict given some context info.

what do you think? i'd be happy to submit a PR.

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