Skip to content

Remove --experimental-loader ExperimentalWarning as the option doesn't exist anymore / is no longer experimental #51196

@cuuupid

Description

@cuuupid

Version

21.4.0

Platform

MacOS Sonoma

Subsystem

No response

What steps will reproduce the bug?

Using --loader (not --experimental-loader)

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

This feature is clearly no longer experimental (ESM has been out for years, is the default for many new projects, and the option is no longer --experimental-loader but --loader). Since it generates an ExperimentalWarning and specifically logs --experimental-loader I'm almost certain this is just an oversight.

What do you see instead?

(node:82007) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("./loader.js", pathToFileURL("./"));'

Additional information

Was previously discussed in #30213 and there were plans to merge a fix for this in 2019, but seems the discussion was closed and died out. Opening a new issue for visibility (and also since the error/basis is slightly different).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions