choojs / bankai

:station: - friendly web compiler
Apache License 2.0
1.09k stars 102 forks source link

Babel 7 support #523

Open johncalvinroberts opened 5 years ago

johncalvinroberts commented 5 years ago

a 🙋 feature request

Just tried firing up a new bankai this morning and ran into some issues when configuring babel presets.

Expected Behavior

Can install babel 7 @babel/core and other babel presets + plugins for babel 7

Current Behavior

When running bankai start index.js, it threw error:

scripts:browserify.bundle Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.

Code Sample

(from package.json)

{
 ...
  "browserify": {
    "transform": [
        ["babelify", {"presets": ["@babel/preset-env", "@babel/preset-react"]}]
    ]
  }
 ...
}
Software Version(s)
Package bankai@9.15.0
Runtime node 10.6.0
Package Manager npm
Operating System macos 10.12.6

Thanks in advance! Bankai is cool :)

goto-bus-stop commented 5 years ago

yeah, bankai includes babel by default, and is currently still using v6 :(

switching to v7 is 'planned' for bankai v10, but it's unclear when that'll be ready.

e; are you installing babelify manually as well, and if so which version? bankai includes one, but it's one for babel v6.

johncalvinroberts commented 5 years ago

Hi! Not installing babelify manually -- just using bankai default, 8.x.x can't remember the exact version, bankai's dependency. I tried installing from branch babel-7, seems to work (somewhat) but maybe some issues. Is it supposed to be transpiling node_modules?

Anything I could do to help?