mdn / sprints

Archived: MDN Web Docs issues are tracked in the content repository.
https://github.com/mdn/content
Creative Commons Zero v1.0 Universal
151 stars 144 forks source link

Clarification required concerning Javascript import #3978

Closed gdennie closed 3 years ago

gdennie commented 3 years ago

The distinction between the following two import syntax is not sufficiently clear. The notion of un-exported is not clarified and presumes the reader knows enough to not require the documentation in the first place. I am still in the midst of research since the article is not clear.

import { export1 , export2 } from "module-name";
import { foo , bar } from "module-name/path/to/specific/un-exported/file";

Clearly, module-name, is not itself a directory such that it should contain the subdirectory path/to/specific/un-exported which contains file.js that is somehow un-exported.

A question on this issues remains somewhat open on stackoverflow understanding es6 named imports

chrisdavidmills commented 3 years ago

Issue moved to mdn/content #1436 via ZenHub