@compiled/babel-plugin@0.35.0
atlas-dst-bot
released this
02 Jan 23:56
·
8 commits
to master
since this release
Minor Changes
-
34e5339: Fix
@compiled/babel-plugin
to not requirecssMap()
to be called prior to use.Example, this failed before for no reason other than the fact that our
state.cssMap
was generated afterJSXElement
andJSXOpeningElement
were ran.import { cssMap } from '@compiled/react'; export default () => <div css={styles.root} />; const styles = cssMap({ root: { padding: 8 } });
-
34e5339: Throw an error when compiling a
cssMap
object where we expect acss
or nestedcssMap
object.Example of code that silently fails today, using
styles
directly:import { cssMap } from '@compiled/react'; const styles = cssMap({ root: { padding: 8 } }); export default () => <div css={styles} />;
What we expect to see instead, using
styles.root
instead:import { cssMap } from '@compiled/react'; const styles = cssMap({ root: { padding: 8 } }); export default () => <div css={styles.root} />;