redom is removed by babel when using jsx
syffs opened this issue · comments
syffs commented
I'm using babel, typescript and webpack
here is a sample:
import * as redom from redom
class ButtonComponent {
el: HTMLElement
constructor() {
// this.el = redom.el('button') // workaround
this.el = (<button className="btn">Go</button>)
}
}
basically, redom is seen as unused import and gets purged by babel without the above workaround. Hence, it fails with error 'redom is not defined'.
any idea ?
Juha Lindstedt commented
You should probably create babel issue instead 🤔