These are chat archives for systemjs/systemjs

Apr 2015
Eugene Baranov
Apr 24 2015 23:07
This message was deleted

Hi guys, I have a question according to the es6 format modules.

Previously in my project I use gulp and babel 5 for compile my es6 sources into "amd" modules. In this case I was able to import my es6 modules using the next format:

import { exportVarA, exportVarB } from 'dependency1';

but. When I tried migrate my project from requirejs to systemjs with babel-runtime, I found what I can't use notation which I described above. I'm available use only the next module import notation:

import Dependency1 from 'dependency1';

Can anyone help me understand what I'm doing wrong? Thanks.

Eugene Baranov
Apr 24 2015 23:53
I found the answer, but didn't understand why it is not possible :)
So, I've tried to import { Model } from 'backbone'; where backbone is cjs module and in this case I can't use { ... } notation. And everything ok, when importing my own modules, which were written using es6 syntax.
But, @guybedford why this case works well, when I'm using pre-compile stage via gulp-babel and does not work with babel-runtime? Maybe you have any ideas...
Any suggestions from others are welcome, thanks.