-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moment example is too large #22
Comments
@alexeagle There is some kind of empty link or broken image in here. |
The strategy I'd like to pursue is to change the usage site to
but it doesn't work yet, first issue is the cyclical dependency I just linked |
What about the following variation?
(In addition to complexity though, this has a probably deeper problem. Tools that process code, usually do so by adding more layers of wrapping around constructs already there. I don't know if any of the available tools could, for example, reason about CommonJS code enough to come up with something like to a FESM module as output.) |
I'm sure you could repackage moment, but that solution doesn't scale, users
will expect 100s of libraries to work. I'd like to find a formula given the
official distro of a library, and your best option for including it
(sometimes point closure at sources, sometimes include the .min.js outside
the closure bundle, etc)
…On Tue, Apr 18, 2017 at 12:26 PM Kyle Cordes ***@***.***> wrote:
What about the following variation?
- Start with source code of recalcitrant library
- Process it through Babel then Rollup, both configured in a way that
resolves any circular dependencies and attempts to compile away any
language constructs that give Closure difficulty
- Feed the results into Closure
(In addition to complexity though, this has a probably deeper problem.
Tools that process code, usually do so by adding more layers of wrapping
around constructs already there. I don't know if any of the available tools
could, for example, reason about CommonJS code enough to come up with
something like to a FESM module as output.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC5I1N4GfaL1lj4R5c5UC3QDKB-7qSJks5rxQ5jgaJpZM4NAnlL>
.
|
Oh, actually I was trying to suggest my middle step as a way to avoid having to repackage a library. Get the source code (hopefully included in the package, though sometimes is not there, example RxJS). Have some process to run it through that does a decent job consuming a wide variety of source code, and feed that into Closure. That way Closure doesn't have to carry the whole burden of being able to directly consume the vast variety of constructs found in the wild. I might be overthinking it though. Maybe I (actually all of us who have commented on any of this) have simply been unlucky and picked a first handful of packages that are particularly difficult to persuade Closure to absorb. Obviously be fantastic if what you describe, works in general. |
(making another issue for other libs, this one is Moment.) |
Moved to current demo repo |
153kb of the bundle is just to get
moment().format()
The text was updated successfully, but these errors were encountered: