Git Product home page Git Product logo

Comments (7)

tirthbodawala avatar tirthbodawala commented on July 16, 2024

Hey @dav-is thanks for raising the question, only the Styles in resources are globally scoped and should be used for 3rd party library.
all the css in compnents like
src/components/home/style.scss
Is locally scoped.

from react-pwa.

dav-is avatar dav-is commented on July 16, 2024

The classnames aren’t scoped. It uses style_${classname} so it may be scoped by the route but the classnames can conflict.

from react-pwa.

dav-is avatar dav-is commented on July 16, 2024

See “modules” in the css-loader repo. Seems to be set to false in the repo when it should be true

from react-pwa.

tirthbodawala avatar tirthbodawala commented on July 16, 2024

@dav-is For development mode only there is style_${classname} for production mode that gets converted to module scoped with hash.

const localIdentName = isResource ?
    "[local]":
    (
      development ? "[name]__[local]" : "[name]_[local]_[hash:base64:5]"
    );

from react-pwa.

dav-is avatar dav-is commented on July 16, 2024

That’s an issue. CSS doesn’t behave consistently.

from react-pwa.

tirthbodawala avatar tirthbodawala commented on July 16, 2024

Creating hash during development is really a heavy process... That is the reason hash is only included in production mode. Can you please explain a scenario where this can cause issue?

from react-pwa.

dav-is avatar dav-is commented on July 16, 2024

from react-pwa.

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.