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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: esm: explain * as alias behaviour with cjs modules #34949

Open
1 task done
rifler opened this issue Aug 27, 2020 · 3 comments
Open
1 task done

doc: esm: explain * as alias behaviour with cjs modules #34949

rifler opened this issue Aug 27, 2020 · 3 comments
Labels
doc Issues and PRs related to the documentations. esm Issues and PRs related to the ECMAScript Modules implementation. module Issues and PRs related to the module subsystem.

Comments

@rifler
Copy link

rifler commented Aug 27, 2020

馃摋 API Reference Docs Problem

  • Version: 12.18.3
  • Platform: Darwin rifler-osx 19.6.0 Darwin Kernel Version 19.6.0: Sun Jul 5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64 x86_64
  • Subsystem: ECMAScript modules

Location

Section of the site where the content exists

Affected URL(s):

Description

Concise explanation of the problem

for example, React@16.13.1 is cjs-only package now

// index.mjs

import React from 'react';
console.log(React);

// {
//     Children: {
//         map: [Function: mapChildren],
//         forEach: [Function: forEachChildren],
//         count: [Function: countChildren],
//         toArray: [Function: toArray],
//         only: [Function: onlyChild]
//     },
//     Component: [Function: Component],
// ........
// index.mjs

import * as React from 'react';
console.log(React);

// [Module] {
// default: {
//         Children: {
//             map: [Function: mapChildren],
//             forEach: [Function: forEachChildren],
//             count: [Function: countChildren],
//             toArray: [Function: toArray],
//             only: [Function: onlyChild]
//         },
//         Component: [Function: Component],
// ........

In my opinion it is not obvious (and maybe not interoperable with existing code) and it will be nice to document


  • I would like to work on this issue and
    submit a pull request.
@rifler rifler added the doc Issues and PRs related to the documentations. label Aug 27, 2020
@therealansh
Copy link

I would like to take this one up. Can you help me out since i am new to node and willing to contribute.

@DerekNonGeneric
Copy link
Contributor

Here's another issue about star-things. Perhaps it is of interest to y'all.

nodejs/modules#545

@aduh95
Copy link
Contributor

aduh95 commented Sep 3, 2020

@therealansh Thanks for volunteering! @rifler has checked the box saying they are willing to work on solving the issue themself, maybe you can ask them if they are working on it first.

That being said, the process of making changes is described in doc/guides/contributing/pull-requests.md, and you are very welcome to ask questions if you have any.

@targos targos added esm Issues and PRs related to the ECMAScript Modules implementation. module Issues and PRs related to the module subsystem. labels Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. esm Issues and PRs related to the ECMAScript Modules implementation. module Issues and PRs related to the module subsystem.
Projects
None yet
Development

No branches or pull requests

5 participants