You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2023. It is now read-only.
Copy file name to clipboardexpand all lines: doc/plan-for-new-modules-implementation.md
+5-9
Original file line number
Diff line number
Diff line change
@@ -68,8 +68,6 @@ The “minimal kernel” consists of features that the @nodejs/modules group hav
68
68
69
69
Phase 2 fleshes out the implementation with enough functionality that it should be useful to average users as a minimum viable product. At the completion of Phase 2, the old `--experimental-modules` implementation is replaced with this new one (still behind the `--experimental-modules` flag).
70
70
71
-
### Core Functionality
72
-
73
71
* Define semantics for importing a package entry point, e.g. `import _ from 'lodash'`
74
72
- Proposal: [“File Specifier Resolution” proposal](https://github.com/GeoffreyBooth/node-import-file-specifier-resolution-proposal) covers bare module specifier resolution of CommonJS packages.
75
73
- Landed in https://github.com/nodejs/ecmascript-modules/pull/28.
@@ -82,14 +80,9 @@ Phase 2 fleshes out the implementation with enough functionality that it should
82
80
- Proposal: [“Entry Points Proposal”](https://github.com/geoffreybooth/node-esm-entry-points-proposal) covers non-file forms of input as well as adding `--type` flag for controlling file-based input.
83
81
- Landed in https://github.com/nodejs/ecmascript-modules/pull/32.
84
82
85
-
* A loaders solution that supports all items in the [features list in our README](https://github.com/nodejs/modules/#features).
86
-
- Should loaders be per package, per application or either?
87
-
- Will land in Phase 2 only if an implementation without major problems (e.g. memory leaks) can be completed in time. If the problems can be isolated behind a flag specific to loaders, we could upstream a buggy implementation and unflag it after its bugs are fixed.
88
-
89
-
### Needs Consensus
90
-
91
-
* Add, or decide not to support, file extension and directory index searching in ESM.
83
+
* File extension and directory index searching in ESM, behind its own flag.
92
84
- See https://github.com/nodejs/modules/issues/268.
85
+
- Per 2019-03-04 meeting, searching will be disabled by default in ESM but enabled via a flag; and the flag will be neutral as to which state the feature should take (similar to `--type=commonjs` / `--type=module`, where the former is currently a noop because it’s the default; but if the default changes someday, the latter would become the noop).
93
86
94
87
95
88
## Phase 3: Path to Stability: Removing `--experimental-modules` Flag
@@ -98,6 +91,9 @@ Phase 3 improves user experience and extends the MVP. Phase 3 is malleable based
98
91
99
92
### UX Improvements
100
93
94
+
* A loaders solution that supports all items in the [features list in our README](https://github.com/nodejs/modules/#features).
95
+
- Should loaders be per package, per application or either?
96
+
101
97
* Dual CommonJS/ESM packages: Either support packages that can both be `require`d as CommonJS and `import`ed as ESM; or decide to specifically not support dual CommonJS/ESM packages.
0 commit comments