Loading order #57

richburdon opened this Issue Aug 9, 2015 · 5 comments


None yet

4 participants


This might be a more general systemjs feature/question: is it possible to ensure that CSS gets loaded before the main page loads?

I.e., to replace the need for hard coded package links in the header:

<link rel="stylesheet" href="/res/packages/github/twbs/bootstrap@3.3.5/css/bootstrap.css">

With something like this (which works, but loads asynchronously -- so you see the raw HTML for half a second before the CSS loads):

<script type="application/javascript">

We don't provide guarantees for CSS loading order, just like modules. Although the next major release will actually provide this feature as load execution order is set to be deterministic in the latest loader specification.

@areel areel referenced this issue in jspm/jspm-cli Dec 1, 2015

Bundle-sfx css ordering #1337

dalgard commented Jan 8, 2016

@guybedford: When you say 'major release' – are we talking about 1.0.0 of SystemJS? Do you have any idea when that will be?

I need to be able to depend on load order in order to override UI library features without relying on !important statements or inefficient ancestor selectors.


@dalgard unfortunately that update won't be anytime soon, as it requires the whatwg loader spec to be stable first.

@guybedford guybedford closed this Aug 21, 2016

I am experiencing this problem..

Is there some javascript event / method of being notified once all dependencies have been loaded? Because I was thinking of perhaps hiding the entire page content, and then once all dependencies loaded, unhide the content. Does this sound workable?


Ok - it was as simple as:

  System.import("js/site").then(function(m) { $('.body').show(); });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment