Closed dwolfand closed 7 years ago
I have never tried using .babelrc
since I prefer plugin options inside serverless.yml
.
So you tried and babelify did not pull .babelrc
configuration? How was the setup? Share your .babelrc
.
This issue https://github.com/babel/babelify/issues/151 may help.
Here's my .babelrc file, I imagine there are conflicts if we are defining the presets in two places. If there was a way to tell it to simply not use the babel params that would be helpful.
In fact, babel is often recommended to switch to the .babelrc file approach by default for reasons such as multiple plugins/libraries in a project needing to access the same babel configuration.
{
presets: [
"es2015-node4"
],
plugins: [
"transform-object-rest-spread"
]
}
@dwolfand I didn't have time to test .babelrc as you mentioned. In that link it seemed that they set it inside browserify transform.
If both don't work together, then a pr to add support for Babel plugins is required. You are welcome to do a pr.
It would be nice if the babel configuration was pulled from .babelrc file which is generally the cleanest way to do it and will allow for other babel functionality like plugins etc