-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Babel 6 + .babelrc -> TypeError: Cannot read property 'error' of undefined #120
Comments
Removing the
Fresh repo, flyfile copied from
@bucaran Just looks like fly-babel plugin hasn't been fixed/touched since babel bumped to 6.0. There was no |
@bucaran solved. If additional presets & plugins (eg, stage3) are desired, they'd have to be pulled in separately. But passing anything through fly-babel's options works as expected, including sourcemaps 🙌 // ...
.babel({
presets: ['es2015'],
sourceMaps: true,
ignore: [
"foo.js",
"bar/**/*.js"
]
})
// ... |
😄 Yay! |
Hi guys, any update on this? |
@alexfedoseev update to the latest fly-babel changes 👌 |
I'm not sure I follow. I don't use Here is example of my setup: But actually it's not the point. After update to babel 6 I can't even run this thing when I place |
You're kind of doing things the complicated way. You're using the core Fly package to run a bunch of external shell scripts & webpack commands. IMO, if you want to use webpack, use webpack. If you truly wanted to use Fly, you'd find the appropriate fly plugins to run the same tasks. As for the actual issue: it's Babel related... nothing to do with Fly. Option 1 If I were you, I'd ditch the Option 2 So you'd need to change this out for the For either case (I would do both), here is a working Babel6 + webpack setup that experienced similar issues at one point. (webpack config and package.json) Again, this issue has nothing to do with Fly. |
These are different tools. Webpack is bundler, Fly is task runner. I can't run express server with webpack + handle order of building stages of isomorphic application with shell scripts, the same as I can't create bundles for isomorphic application (for example server build working with CSS Modules) with just Fly plugins. Anyway, provided setup was working fine until babel 6 update and the issue is not with my webpack configs b/c of: https://github.com/alexfedoseev/fly-babel-6-issue — if you'll try to run this one (there is no webpack there, just pure fly) — you'll get an error. If you'll remove |
Presets from |
Thanks for the simplified repo. The answer is still 'dont use babelrc'... for now. Fly uses babel-runtime at its core, so your I'm not a contributor/maintainer, just my two cents, especially since it's so easy to add the desired settings to your webpack configs. |
is pretty sad. @bucaran can you help? |
TBH I would like to revert to the original Fly design when I first released it. At the time, while the source code was written in ES6, Flyfiles in JS variants were not supported, at least not out of the box. Before Fly 1.0 happens, I hope to post a draft of what I would like to change and if I can get enough positive replies I will work on something. |
@bucaran I updated everything to the latest versions, but issue is still there: https://github.com/alexfedoseev/fly-babel-6-issue |
@alexfedoseev Couple points:
I've branched your repo with appropriate changes. In this repo, you don't need to setup/configure a Also, here's a list of valid Babel v5.x options that you can use in your |
@lukeed Basically it means that |
You can have them both installed, but there's no point. Fly will use Babel@5 (for now) for parsing its plugins and flyfiles. That's it. If you install Babel6 (for example, as part of Keep in mind, there is NO LOSS in features when using babel@5 vs babel@6.... 5 just allows us to |
@lukeed I feel like I'm missing something. If I can use |
Because The repo only worked because I removed the What you should do is not use a Then, for your npm install -D fly-babel exports.scripts = function * () {
yield this.source('src/scripts/**/.js')
.babel({
presets: ['es2015'],
plugins: [], // etc
})
.target('dist/js')
} |
All of those I could do w/o |
Then don't use You may have to |
After update to
babel@6
I faced following issue: when I place.babelrc
file in the root — build fails. When I remove it —fly
runs fine.Repo to reproduce: https://github.com/alexfedoseev/fly-babel-6-issue
Screen:
Stack:
The text was updated successfully, but these errors were encountered: