Skip to content

V2/V4 - template and install assume cssmodules: true #43

@sthzg

Description

@sthzg

I have just realized that the template's App.js and app.cssmodule.css implicitly assume a generator setup that will use css modules. When installing a V4 setup with prompting no for cssmodules, the dependency for "react-css-modules": "^3.7.6" is still present in package.json (thus it gets installed no matter what the user answers the prompt, and App.js will always have the @cssmodules annotation).

I see four paths from here:

  1. pulling out App.js/app.cssmodule.css from the template and into the generator
  2. defaulting App.js and app.css not to use css modules
  3. stop associating app.js with a style file at all
  4. keeping App.js and app.cssmodule.css as default in the template project and overriding it from the generator if necessary

I'd argument that 1 is the worst of these options, since the template would no longer work standalone, which I'd consider not being an option.

2, 3, and 4 should all be possible. 4 would require custom code (involving the deletion of app.cssmodule.css) and feel a bit unnatural, so at least as of now I think that I am pro 2 or 3.

@weblogixx what's your opinion, do I miss something more obvious?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions