Skip to content

@compiled/babel-plugin@0.35.0

Compare
Choose a tag to compare
@atlas-dst-bot atlas-dst-bot released this 02 Jan 23:56
· 8 commits to master since this release
a2eb963

Minor Changes

  • 34e5339: Fix @compiled/babel-plugin to not require cssMap() to be called prior to use.

    Example, this failed before for no reason other than the fact that our state.cssMap was generated after JSXElement and JSXOpeningElement 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 a css or nested cssMap 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} />;