Flow of ES6 modules

Open
#189 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
web-dev

Research direction

Start by reading the linked Mozilla modules example, especially index.html and main.js, and compare it with the hosted demo. Trace how the browser reaches main.js and document the module-loading flow so the relationship between the HTML entry point and JavaScript is clear.

Written by the indexing model from the issue text.

Description

I had a modest goal for today, to understand how ES6 modules work and have a simple Hello World app that demonstrates.

I've tried to work my way through a bunch of tutorials, the only one that I found that has downloadable demo app is from Mozilla, and I downloaded them, and uploaded the simplest one to a test server, and ran from the browser, Chrome on a Mac.

It works. Here's a link.

http://hunter.scripting.com/moduletest/

Note that will probably not exist for a long time.

So I'm trying to figure out the flow. I set a breakpoint at the beginning of main.js, and it does run, and I stepped through it and it worked.

But here's the question -- how did it get to main.js?

I don't see a call to any script in there from index.html. In fact there is no JS code in index.html.

So that's the beginning. How does this flow? Help appreciated.

Dominant language
HTML
Stars
134
Forks
10
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from scripting/Scripting-News

All issues in scripting/Scripting-News

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.