cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.07k stars 399 forks source link

Webpack loader for static extraction from separate files #855

Open kof opened 6 years ago

kof commented 6 years ago

Me @markdalgleish and @lttb in separate chats discussed that JSS has no examples on static extraction from separate files, even though it can be easily done and big projects like https://www.kijiji.ca/ do it that way.

@markdalgleish has written this webpack loader long time ago.

Todo

HenriBeck commented 6 years ago

Couldn't this work with the babel plugin and merely find all @raw rules and generate a css file from them?

kof commented 6 years ago

This issue is about extracting from separate files, for this functionality no babel plugin is required, it will just require the modules in node and generate css files. Extracting @raw rules is a separate story, evtl can be done later in this plugin as well.

kof commented 6 years ago

We got https://github.com/cssinjs/jss-loader repo transfered from Mark and I am in npm package owners, so we can publish in that namespace