I was building an ES6 project with browserify
and babelify
6.4.0, but using the latest versions of both there is no more {"optional": "runtime"}
option. Is there a way to get babel 6.10.2 and babelify 7.3.0 to do exactly the same thing as the older versions?
Asked
Active
Viewed 41 times
1 Answers
1
You'll want to:
npm install --save-dev babel-plugin-transform-runtime
npm install --save babel-runtime
then in your Babel config, you'd enable the plugin:
plugins: ['transform-runtime']

loganfsmyth
- 156,129
- 30
- 331
- 251
-
I've tried that, however it breaks my build (the Angular application builds but no longer runs) for reasons that are not clear - even when the es2015 and stage-0 presets are requested. – joeforker Jun 23 '16 at 13:16
-
This is the answer to your question for the information you've given. If it doesn't work, please expand the question with enough details to make the true problem clear. If it doesn't run, what error do you get? – loganfsmyth Jun 23 '16 at 15:49
-
It looks like my application is not compatible with Babel 6 for inscrutable reasons. – joeforker Jul 08 '16 at 17:27
-
1https://stackoverflow.com/questions/33505992/babel-6-changes-how-it-exports-default is the biggest functionality change between 5 and 6. – loganfsmyth Jul 08 '16 at 23:52