Giter VIP home page Giter VIP logo

Comments (5)

JiarongGu avatar JiarongGu commented on May 30, 2024 1

this really should remove the main--red instead of output it to file. I saw this issu and no reply, so I made my own type loader from this idea.

from css-modules-typescript-loader.

markdalgleish avatar markdalgleish commented on May 30, 2024 1

Our (current) philosophy is that we shouldn’t modify your classes in any way. If it’s something that TypeScript doesn’t allow, TypeScript should tell you—otherwise we’ll need to bloat up this loader with duplicated logic for detecting invalid identifiers.

from css-modules-typescript-loader.

JiarongGu avatar JiarongGu commented on May 30, 2024 1

Use css-loader with option camelCase actually convert the main--red to 2 set of keys mainRed and main--red, which both link to the same style. I did not mean to modify the existing class, but it should not be exported as a type file because its invaild TypeScript. You can access to the style with styles['main--red'] anyway without the type. for some people like to follow BEM pattern this should be acceptable or as a configuration.
The camelCase convertion css-loader using is https://github.com/sindresorhus/camelcase

from css-modules-typescript-loader.

silbinarywolf avatar silbinarywolf commented on May 30, 2024

After re-reading the README, this might not be an issue when you're developing with a Webpack console window open.

Feel free to close if you guys think adding your own error handling is redundant or out-of-scope here

from css-modules-typescript-loader.

bushee avatar bushee commented on May 30, 2024

I've just proposed PR #9 which addresses this issue.

from css-modules-typescript-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.