Skip to content

Conversation

claudioc
Copy link
Owner

@claudioc claudioc commented Jun 25, 2017

This PR (not to be merged, at the moment) adds basic support for CSS modules to the project. It does it by:

  • enabling the native "modules" option in webpack css loader
  • changing the JSX templates to use the style.dynamicallyGeneratedClassName style for className property in React
  • adds a catch-all global.d.ts for TypeScript to be able to "see" the styles.css module files (only for TS 2.0+) (thanks to @mohsen1 for the idea)

What is missing is a proper loader which would create the d.ts file for each css module on the fly, so to be able for the editor to provide autocomplete feature and avoid using a global.d.ts.

There are two or three options to do that (plus the changes in the WebPack configuration to deal with the dynamic generation of new files in the src directory), see this issue for a deeper discussion on the topic. As for the project goal, I try to avoid taking decisions on behalf of who is going to use starter kit for a serious project when they can have an impact on the final result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant