mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
3fb7426f83
Previously we assumed if `--experimental-detect-module` is true, then `--experimental-require-module` is true, which isn't the case, as the two can be enabled/disabled separately. This patch fixes the checks so `--no-experimental-require-module` is still effective when `--experimental-detect-module` is enabled. Drive-by: make the assertion messages more informative and remove obsolete TODO about allowing TLA in entrypoints handled by require(esm). PR-URL: https://github.com/nodejs/node/pull/55250 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
6 lines
283 B
JavaScript
6 lines
283 B
JavaScript
// This file can be run or imported only if `--experimental-default-type=module` is set
|
|
// or `--experimental-detect-module` is not disabled. If it's loaded by
|
|
// require(), then `--experimental-require-module` must not be disabled.
|
|
export default 'module';
|
|
console.log('executed');
|