Closed jefffriesen closed 8 years ago
Try
{
"presets": ["react", "es2015", "stage-1"],
"plugins": [
"transform-decorators-legacy"
],
"env": {
"development": {
"plugins": [
"tcomb"
]
}
}
}
Note the dev
-> development
. i.e. it needs to match the value of your NODE_ENV
.
Hey - that works. When you wrote that it was obvious. I don't know why I was using 'dev'. I must have seen other env examples using 'dev'.
Any thoughts on documenting tcomb as dev-only by default? I can submit a documentation PR.
A couple issues:
.babelrc
setup that says how to use this only in dev mode. Why wouldn't this be the default setup in the documentation? Do people typically use this in production?This .babelrc works (catches type errors):
I've confirmed that the environment is set as
development
by console.log'ing outprocess.env.NODE_ENV
in each case.Have I set it up incorrectly or is this a bug? Is this typically only used in development?
Thanks