In Meteor, without webpack I’d probably need to rely on babel and postcss? I have no clue how to integrate these together.
@akryum as you did port vue-loader from webpack to meteor, do you have an idea of what is needed to have the same thing in React?
Basically I would declare my styles in the middle of a .js file like that:
or
and this would work similarly to how vue is doing.
@all: how do you manage your styles in React today ? BEM convention? or you have something more solid like Vue?
You can’t use postcss with styled-components. But styled-components do auto prefixing automatically for you. Instead of using postcss plugins you can use javascript functions that do transformations like units convertion etc.
It’s regular CSS modules, so you won’t get JS+CSS in one file like with Vue single-file components.
You put a CSS file next to your js component file, import styles from './MyComponent.css' in your component, and put className={styles.someClass} in your component’s JSX. Voila