2

I've got a file named index.js which looks like this:

import Backbone from 'backbone'
import _ from 'underscore'
import $ from 'jquery'

console.log("blah")
export default {...}

In my index.html I've got:

<script>
  System.import('index');
</script>

But what's baffling me is that I can see the file being loaded (in the dev tools network panel) but the console.log is never run. If this is the case, how am I to bootstrap my application?

Several online tutorials suggest bootstrapping it in the System.import file but how can that be done if the code isn't executed?

1 Answer 1

1

I ended up adding a .then() to the System.import with three anonymous functions, all with just a debugger and found that the import $ from 'jquery' was timing out because I didn't have the library installed. I removed the import declaration and the app was still trying to load jquery, so I installed it and it fixed the issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.