cssx icon indicating copy to clipboard operation
cssx copied to clipboard

Loader for independent files.

Open zvictor opened this issue 9 years ago • 1 comments

I have a setup where I add my styling as independent .cssx files. It works well with the meteor quadric:cssx plugin, but now I need to add integration with my storybook.

I couldn't find anywhere in the docs or examples a way to config webpack to load .cssx files instead of .js(x). I tried many ways, in different orders, but I can't get rid of the following error:

ERROR in ./myProject/myComponent.cssx
Module parse failed: /absolutePath/myProject/myComponent.cssx Unexpected token (2:2)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (2:2)

Could someone add an example with independent .cssx files? Preferably using storybook?

zvictor avatar Sep 13 '16 10:09 zvictor

Is it an option to create a.js file that exports something like:

export default <style>
... your styles here ...
</style>;

krasimir avatar Sep 16 '16 05:09 krasimir