You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to use preconstruct with css modules. So inside the components, i write e.g. const styles = import './styles.css';, which should give me an object with the classnames from the stylesheet as properties that can be used in the component.
To make it work, I have tried to use babel-plugin-css-modules-transform. From babel.config.js:
But when running yarn preconstruct build i get the error Unexpected token (Note that you need plugins to import files that are not JavaScript), so it seems the css is not correctly transformed.
Anything I am missing? Is it possible to use css modules with this package at all?
The text was updated successfully, but these errors were encountered:
I try to use preconstruct with css modules. So inside the components, i write e.g.
const styles = import './styles.css';
, which should give me an object with the classnames from the stylesheet as properties that can be used in the component.To make it work, I have tried to use
babel-plugin-css-modules-transform
. Frombabel.config.js
:But when running
yarn preconstruct build
i get the errorUnexpected token (Note that you need plugins to import files that are not JavaScript)
, so it seems the css is not correctly transformed.Anything I am missing? Is it possible to use css modules with this package at all?
The text was updated successfully, but these errors were encountered: