Skip to content
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

6.1.0 - bug with <script type="systemjs-module"> before systemjs is loaded #2024

Closed
joeldenning opened this issue Sep 12, 2019 · 0 comments
Closed

Comments

@joeldenning
Copy link
Collaborator

joeldenning commented Sep 12, 2019

In 6.1.0, the following code works:

<script type="systemjs-importmap">
  {
    "imports": {
      "foo": "/foo.js"
    }
  }
</script>
<script src="https://cdn.jsdelivr.net/npm/systemjs@6.1.0/dist/system.js"></script>
<script type="systemjs-module" src="import:foo"></script>

But the following code doesn't:

<script type="systemjs-importmap">
  {
    "imports": {
      "foo": "/foo.js"
    }
  }
</script>
<script type="systemjs-module" src="import:foo"></script>
<script src="https://cdn.jsdelivr.net/npm/systemjs@6.1.0/dist/system.js"></script>

image

The bug is related to whether the <script type="systemjs-module"> element is before or after the <script src="system.js"> element.

Repo that demonstrates the problem: https://github.com/joeldenning/systemjs-race-condition-bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant