-
Notifications
You must be signed in to change notification settings - Fork 185
EML not working without a transpiler #511
Comments
This project on its own doesn't support any transpilerless workflows, see SystemJS for examples of these built on top of this project. |
Thanks for the response. I am not griping just confused by some of the doc wording. I guess the read me is a little confusing then... So It Is Not Optional Possible Feature Request |
this is a loader, not a parser. If the browser can parse the module syntax then you can use that syntax with it, but no browser has implemented that as yet. As browsers do not currently understand import/export, you have to transpile into something they do understand. You can do that directly with the loader/transpiler combination, but the transpiler has to load a large parser as it can't access the browser's parser, so this is not suitable for production. |
though looking at your code, index.js isn't a module anyway - it's not importing or exporting anything |
First Comment So why not include only that part of the transpilater that only handles the import/export. That way there is no dependency on a transpiler. As you can see in my above code it fails to work even without a transpiler. You could also continue to leave the option for a full transpiler. But at least including a transpiler/parser for the import/export would be good. Second Comment |
changing to a transpiler that only handles import/export is the plan for the new loader - see #463. This won't reduce the size overmuch, though, as the size comes from the parser. Your code is trying to log the exports of a System.import on a file which doesn't export anything. I would imagine that's why it's failing. |
Ah yes that is exactly what I am talking about. I will read through it. Has there been any progress on this yet? No I dont think that is why. Because in one of my test I did have imports in index.js. But I was not using a transpiler. Check the index.html no transpiler so that would have been the issue. |
From the docs it seems as though you can use EML without a transpiler is that not correct?
error
index.html
index.js
es6-module-loader.js
The text was updated successfully, but these errors were encountered: