These are chat archives for systemjs/systemjs

8th
Jan 2019
Micah Zoltu
@MicahZoltu
Jan 08 11:17
Is there a version of SystemJS that can be imported with type='module'?
I really only want to use SystemJS for the package name maps feature, but I believe I need to use the whole loader to achieve that. Wondering if I can at least load the loader as a module, and if so would that buy me anything.
Micah Zoltu
@MicahZoltu
Jan 08 11:27
Does SystemJS support ES2015 modules? I'm getting import declarations may only appear at top level of a module when I try to load an ES2015 module with SystemJS.
Guy Bedford
@guybedford
Jan 08 12:21
Perhaps take a look at Es module shins instead
Micah Zoltu
@MicahZoltu
Jan 08 13:25
Yeah, found that not long after I asked here. I think it is what I need, now just trying to figure out how to make third party libraries play nice with it and TypeScript... I have clearly entered hell.
Ahah! I think I have it working.
Knockout.js, TypeScript, es-module-shims, ES modules, modern browser.
Guy Bedford
@guybedford
Jan 08 15:40
Nice, TypeScript is purposely dragging its heels on tackling this tooling problem unfortunately.
Micah Zoltu
@MicahZoltu
Jan 08 15:53
Yeah, it sounds like they don't want to move until the module path spec is done.
I can appreciate their stance, though I hope that they are paying attention and thinking about how they plan to integrate when the time comes and can provide feedback for spec authoring.
I'm a little worried about the whole "need an extension" stuff in the current spec.
Guy Bedford
@guybedford
Jan 08 15:54
it's pretty much a done deal
Micah Zoltu
@MicahZoltu
Jan 08 15:55
:cry:
Guy Bedford
@guybedford
Jan 08 15:55
note that a standard workflow would be "Typescript src -> lib, Rollup lib ->dist" and extensions work out fine in these workflows
Micah Zoltu
@MicahZoltu
Jan 08 15:55
Expecting that workflow makes me sad.
Guy Bedford
@guybedford
Jan 08 15:55
alternatively a simple script could fix it for an unbundled dev workflow
Micah Zoltu
@MicahZoltu
Jan 08 15:56
Native modules and HTTP/2 make it so we don't need to be bundling anymore.
Yet people keep designing things under the assumption that bundling is always (and always will be) a good thing.
Guy Bedford
@guybedford
Jan 08 15:56
hastle the TS devs :)
Micah Zoltu
@MicahZoltu
Jan 08 15:56
Bundling makes things worse when you have HTTP/2 on both ends and a good server-side prefetching setup.
Guy Bedford
@guybedford
Jan 08 15:56
but yeah I guess it's a bit of a tricky one to know how to integrate for them
I'm sure they'll do it eventually, just have to get through denial phase first
Micah Zoltu
@MicahZoltu
Jan 08 15:57
Heh.
Considering the only issue they haven't closed on this subject is the one that suggests compilere adding .js to imports makes me think that they are prepared to act on that when the time comes (spec is finalized).
All of the other issues on the topic get closed with prejudice.
Guy Bedford
@guybedford
Jan 08 17:14
well hopefully we can make progress there soon