Open leiming opened 8 years ago
Thanks, but is this even necessary? Won't it pick up a local .babelrc?
The problem of latest master version is static react
only register the presets as https://github.com/jxnblk/static-react/blob/master/bin/static-react.js#L4-L8, but ignore the local .babelrc.
For example, my repo has the .babelrc
as below:
{
"presets": ["es2015", "react", "stage-1"],
"plugins": ["transform-decorators-legacy"]
}
}
executing static react
will throw the error: React.js Decorators are not supported yet in 6.x pending proposal update dispite of having installed babel-plugin-transform-decorators-legacy
.
If we pick up .babelrc by static-react -b .babelrc
, That's all right! shall we support .babelrc ?
I think using .babelrc is the most standard way to go. Also think the flag should be -c
--config
as that seems more common.
All right.
babelconfig.json
We can use the below command in order to using Decorators: