vazco / universe-modules

Use ES6 / ES2015 modules in Meteor with SystemJS
https://atmospherejs.com/universe/modules
MIT License
52 stars 7 forks source link

[modules-entrypoint] Found 3 new bugs. Hooray! #32

Closed rozzzly closed 4 years ago

rozzzly commented 8 years ago

I've got an extensive investigation of some issues I found with the entrypoint package, but for exposure's sake and because those issues may very well affect the main package as well I will post here. I'm about to start my work shift, so I dont have time to make this issue descriptive. I'll do that when I get off. This is an awesome project, and I believe could should serve as the defacto meteor solution.

Heres my notes: https://github.com/rozzzly/madules

README.md has all of what I found. Also ./test contains several meteor apps testing various aspects of this package.

Related #29 and also https://github.com/meteor/meteor/pull/5475

MacRusher commented 8 years ago

Thanks for all those remarks and notes! I will look into them tomorrow, but just a quick info for you and all other interested in modules-entrypoint

When I was developing this new package my test suite app was quite simple and everything works so I decided to publish it. Probably too fast :)

Once I try to port some bigger app already written in original universe:modules I stumble upon lots of issues and problems. Some of them you already described.

At the moment I don't recommend to use modules-entrypoint in production or in any bigger project, unless you want to help with development :)

My current idea is that this entrypoint concept just could not work everywhere. There are lots of cases when you want to leave .js files alone, like some vendor scripts etc. This could be done by using directories to mark which files should be compiled to modules and which not, e.g. imports/ or dontMakeModulesOutOfThisFiles/ :) directories working like client/ server/ dirs. Another example could be issues with semantic:ui package, in current version of entrypoint it just won't work, probably I'm messing with "magic" that package is doing to create new files.

Big question here is whether it still makes sense to work on module implementation, as MDG is also working on it and unfortunately chosen different route. I agree with you that SystemJS-based solution would be better fit for Meteor then something webpack-alike, but I'm afraid we cannot do much about it. And two modules systems would be even worse :)

cristo-rabani commented 8 years ago

I have another concept. The problem of package modules-entrypoint is that some of js files need to be loaded directly instead of registering them. I have a idea for this. Instead of registering all files, we must make analysis if this file can be loaded directly (as a module) or if deps in current moment are not satisfied and current file can be only registered for future imports. ( I assume that if file has no imports, it mean that all deps are satisfied. )

It can be done writing plugin for babel module transpiler

radekmie commented 4 years ago

We've decided to archive some of our repositories as we are no longer using nor willing to maintain them. Part of this process involves closing related issues and PRs. If you still need help, do contact us on opensource@vazco.eu.