threepointone/glamor

Production babel plugin transform-react-constant-elements breaks

Closed this issue · 2 comments

First off I love glamor and its LESS syntax, its been a breeze to use.

This was a small issue I noticed that I was wondering if anyone else did - it looks like the transform-react-constant-elements babel plugin with glamor results in an error unless explicitly calling toString on the glamor css object. Has anyone noticed this?

could you make a test case that reproduces this?

I tried with a simple example

import React from 'react'

import { css } from 'glamor'

let cls = css({ color: 'red' })

export class App extends React.Component {
  render() {
    return <div className={cls}>what now</div>
  }
}

and it worked just fine. closing this, feel free to reopen if you have a reproducible test case.