-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.
Description
I'm aware that I can name a file with .mjs or set "type": "module" in package.json. I'm also aware of the --input-type=module CLI parameter.
What I'm not understanding is, why isn't there a way to pass a parameter flag to force module interpretation for the .js file I specify? Was there a reason that --input-type can only be used with string input and not to control module interpretation of a .js file?
I tried searching old issues to find this discussed but my searching failed me. I feel certain it must have been intentionally omitted, but I'm just trying to understand why?
WebReflectionbenjamingr
Metadata
Metadata
Assignees
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.