-
Notifications
You must be signed in to change notification settings - Fork 102
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
Babelify config for Browserify does not work with rc10 #329
Comments
Oh, that's odd. I would've expected shama/yo-yoify#58 by @goto-bus-stop to have solved our final compat issues. My guess is there's probably some parser in the tree that's operating on an outdated version. Also, on a side note we're going to be baking in Babel support for stable language features sometime in the next 2 weeks. Hopefully that'll fix this issue in the long run C: |
👍 for baking Babel in! Still this simple Browserify config should still work, right? |
Yeah, I would've expected it to! Not sure why it isn't parsing the Could you perhaps run |
This is the output on
|
Ugh; looks like we did too good of a job on prettifying errors >.> Let me try and repro this. Be back with you in a bit! |
Thanks! |
Okay, looks like diff --git a/lib/graph-script.js b/lib/graph-script.js
index 86d345a..2e4d083 100644
--- a/lib/graph-script.js
+++ b/lib/graph-script.js
@@ -37,7 +37,7 @@ function node (state, createEdge) {
b.ignore('sheetify/insert')
b.transform(sheetify)
- b.transform(brfs)
+ // b.transform(brfs)
b.transform(glslify)
b.transform(yoyoify, { global: true })
@@ -51,6 +51,7 @@ function node (state, createEdge) {
self.emit('progress', 'scripts', 30)
b.bundle(function (err, bundle) {
+ console.log('error', err)
if (err) {
delete err.stream
err = ttyError('scripts', 'browserify.bundle', err) Recommended to run without switching buffers through the $ bankai start -q It seems after this patch is applied there's still some errors related to importing source type module style modules from within Node. So there may be a few more hurdles, ugh. Let me dig a little further on how to solve this, ghmmm. edit: note that this may just be an issue with |
Thanks Yosh. |
Oh, no yeah think I figured it out — I think the transform needs to be global because |
Passing `"global": true` to the babelify transform options should also make it run globally, im 80% sure
…On 14 November 2017 14:58:06 CET, Yoshua Wuyts ***@***.***> wrote:
Oh, no yeah think I figured it out — I think the transform needs to be
_global_ because `lit-html` uses the `export` keyword, and locally
defined transforms don't operate globally. Alright, let's get Babel
support into core! @kahlil any presets you generally use?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#329 (comment)
--
Sent from mobile. Please excuse my brevity.
|
oh yeah yeah that's not an issue I just added the same config into the lit-html package.json to make that work. A global transform is not advisable I think. My problem was just that the transform did not apply to my file. When it comes to presets I am just interested in the default |
Waiting for
@kahlil Oh cool! — what would you like to see from Rollup? We have tree shaking, bundle flattening, and soon code splitting too (in #266). Would we be missing anything? (: |
Oh, well don't mind me then, that sounds perfect 😄 . |
Added a PR to add Babelify into Bankai directly here #332 🎉 — If this doesn't land straight away, we should at least be publishing the |
✨
…Sent from my iPhone
On 14. Nov 2017, at 18:51, Yoshua Wuyts ***@***.***> wrote:
Added a PR to add Babelify into Bankai directly here #332 🎉 — If this doesn't land straight away, we should at least be publishing the brfs patch within the next 24 hours. Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
We're probably going to release |
Works-a like-a deh charm-a! (Mario voice) 🙏 thanks y'allz are super. |
Yay, glad to hear! |
I use the following Browserify config:
And Bankai can't parse the
import
syntax:The necessary modules are installed.
The text was updated successfully, but these errors were encountered: