Skip to content

Produce JSON file(s) with class mappings #988

Closed
@DanielHeath

Description

@DanielHeath

Previously discussed in #143 , but that solution has not worked for a long time.

  • Operating System: ubuntu
  • Node Version: v12.5.0
  • NPM Version: yarn 1.16.0
  • webpack Version: 4.32.2
  • css-loader Version: 2.1.1

Feature Proposal

When compiling CSS modules, export a JSON file containing the mappings, so that the generated classnames can be used by e.g. SSR setups, and even from other languages.

Feature Use Case

I really like using CSS modules as it lets me be sure that my CSS is not clobbering anything.

I'm using webpacker through rails, and I'd like to use CSS modules from my rails templates.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions