File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ function shouldUseESMLoader(mainPath) {
5050
5151 const { readPackageScope } = require ( 'internal/modules/cjs/loader' ) ;
5252 const pkg = readPackageScope ( mainPath ) ;
53+ // No need to guard `pkg` as it can only be an object or `false`.
5354 return pkg . data ?. type === 'module' || getOptionValue ( '--experimental-type' ) === 'module' ;
5455}
5556
Original file line number Diff line number Diff line change @@ -116,8 +116,8 @@ class EnvironmentOptions : public Options {
116116 bool experimental_https_modules = false ;
117117 bool experimental_wasm_modules = false ;
118118 bool experimental_import_meta_resolve = false ;
119- std::string input_type;
120- std::string type;
119+ std::string input_type; // Value of --input-type
120+ std::string type; // Value of --experimental-type
121121 std::string experimental_policy;
122122 std::string experimental_policy_integrity;
123123 bool has_policy_integrity_string = false ;
You can’t perform that action at this time.
0 commit comments