-
-
Notifications
You must be signed in to change notification settings - Fork 41
Usage alongside babel-preset-stage-* #37
Comments
You could simply include all plugins from |
I know but it's far from perfect, I know have to monitor changes in |
@julien-f I will be releasing a reasonably decent solution for this issue soon. Crawls a babel preset tree and serializes it to relative filepaths, which you can then mutate as you please via modify-babel-preset: var modify = require('modify-babel-preset');
module.exports = modify('stage-0', {
'transform-async-to-generator': false, // remove it
'kneden': true // add it
}); |
@developit Nice! :) |
@developit 's solution looks great, would be nice to add a note on it to the README. |
I will try to publish the recursive preset fix ASAP. |
The solution there isn't working for me. It continues to transform it using generators. If I remove the modified-stage-1-preset then it works (but of course, I lose the other stuff in stages 1-3). // dev/modified-stage-1-preset.js
var modify = require('modify-babel-preset');
module.exports = modify('stage-1', {
'transform-async-to-generator': false, // remove it
}); // .babelrc
{
"presets": [
"es2015",
"./dev/modified-stage-1-preset.js",
"react"
],
"plugins": [
"babel-plugin-async-to-promises"
]
} |
@brigand Correct, the current version of Perhaps it'd be worth skipping the last test replication I've been having issues with and publishing it under a beta tag? The new version would support exactly what you described. |
@brigand Just a note, I've published |
@developit Getting an error. Same code as I posted above.
|
@brigand Do you have |
I have it installed directly. |
I want kneden 😫 |
Tried below piece of code "babel": {
"plugins": ["async-to-promises"],
"presets": ["react", "es2015", "stage-0-kneden"],
} But no luck for me |
Hi everyone, I solved this issue by creating a custom preset. https://github.com/nodegin/babel-preset-stage-0-promises In your {
"babel": {
"presets": ["react", "es2015", "stage-0-promises"]
}
} Now the plugin works perfectly |
@nodegin nice work! It's even using |
@developit lol thanks but why you don't update your preset |
What do you mean? |
@developit I mean the |
Ah - so it was broken when using |
I could not get kneden working with babel-preset-stage-0 despite my efforts, does anyone know of the proper way to achieve that?
The text was updated successfully, but these errors were encountered: