cssx
cssx copied to clipboard
Loader for independent files.
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?
Is it an option to create a.js file that exports something like:
export default <style>
... your styles here ...
</style>;