GithubHelp home page GithubHelp logo

Comments (6)

arihantdaga avatar arihantdaga commented on August 17, 2024 2

I used something old style...
in my scss files i wrote

[data-comp="home"]{
    p {
          coolor: red
    }
}

and in my component's outer tag-

<div data-comp="home"></div>

Is this good ??

from vue-webpack-typescript.

ducksoupdev avatar ducksoupdev commented on August 17, 2024

Hi, thanks for the compliment :)

In terms of scoped styles, I have used CSS modules in a React app with PostCSS and Webpack. It should fit nicely and provide what is needed. It won't be the same style as *.vue files but should have the same result.

There is a nice article on it here https://medium.com/@kswanie21/css-modules-sass-in-create-react-app-37c3152de9

Happy to investigate or leave it up to you to create a PR?

from vue-webpack-typescript.

selenecodes avatar selenecodes commented on August 17, 2024

Oh thanks, will look into it!
If I get a working implementation I'll make a PR for it.

from vue-webpack-typescript.

ducksoupdev avatar ducksoupdev commented on August 17, 2024

I have created a spike repo to show how it could work with this template - ducksoupdev/vue-webpack-typescript-css-modules@f4c57e6...a406361

If this is what you are looking for @joostblok I can add it to the template?

from vue-webpack-typescript.

ducksoupdev avatar ducksoupdev commented on August 17, 2024

See discussion at css-modules/css-modules#65.

The above repo is an implementation that contains two loader configurations for .scss files. This is to explicitly separate CSS modules from global CSS files.

from vue-webpack-typescript.

admhemed avatar admhemed commented on August 17, 2024

Hi, I used ducksoupdev/vue-webpack-typescript-css-modules@f4c57e6...a406361
and it is successfully work,
but css stopped to reload properly,
it reloads, but it brings the old css instead of the new one,
what can I do to fix that?

from vue-webpack-typescript.

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.