Skip to content

Commit

Permalink
update import maps load order docs
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Apr 7, 2019
1 parent 532fdbd commit c58c0fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ For an example of a bundling workflow, see the Rollup Code Splitting starter pro
Say `main.js` depends on loading `'lodash'`, then we can define an import map:

```html

<script src="system.js"></script>
<script type="systemjs-importmap">
{
"imports": {
Expand All @@ -93,8 +93,6 @@ Say `main.js` depends on loading `'lodash'`, then we can define an import map:
<!-- Alternatively:
<script type="systemjs-importmap" src="path/to/map.json">
-->
<!-- SystemJS must be loaded after the import map -->
<script src="system.js"></script>
<script>
System.import('/js/main.js');
</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/import-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Import maps can be loaded inline or from a separate URL using a `<script type="s
</script>
```

It is important that the import map is included before SystemJS itself for it to be picked up properly.
> The import map is fixed as soon as the first `System.resolve` (or indirectly through `System.import`) is called. At this point no new import maps can be loaded currently, although this is under specification discussion at https://github.com/WICG/import-maps/issues/92.
### Imports

Expand Down

0 comments on commit c58c0fa

Please sign in to comment.