GithubHelp home page GithubHelp logo

bjankord / parcel-modules-test-case Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 1.46 MB

Test case repo demoing issue with parcel and css modules

Home Page: https://bjankord.github.io/parcel-modules-test-case/

JavaScript 66.87% CSS 6.96% HTML 26.17%

parcel-modules-test-case's Introduction

parcel-modules-test-case

Test case repo demoing issue with parcel and css modules

Demo app includes .postcssrc which sets modules: true turning on CSS modules. However, CSS modules are only applied to app.scss. Class names used in react components imported from packages in node_modules are not hashed with CSS modules.

Generated HTML:

Note: the foo class name from app.scss gets hashed / run CSS modules correctly. The classes from the imported react component, (button, emphasis, text-only) are added but are not hashed via CSS modules

<div class="_foo_1hhpg_1">
  <button class="button emphasis" type="button" aria-disabled="false">
    <span class="text-only">
      <span class="">Hello from React!</span>
    </span>
  </button>
</div>

Expected HTML output:

classes from the imported react component, (button, emphasis, text-only) are added and hashed via CSS modules being turned on in .postcssrc file.

<div class="_foo_1hhpg_1">
  <button class="_button_2jjfa_1 _emphasis_1ffga_2" type="button" aria-disabled="false">
    <span class="_text-only_1jafa_1">
      <span class="">Hello from React!</span>
    </span>
  </button>
</div>

parcel-modules-test-case's People

Contributors

bjankord avatar

Watchers

 avatar James Cloos avatar  avatar

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.