Skip to content

Support for ECMAScript loader (with "type": "module") #13233

@tschaub

Description

@tschaub

Feature request

What is the expected behavior?

If a loader is authored as an ECMAScript module (or if the nearest package.json has "type": "module"), it would be nice if webpack provided the necessary info to loader-runner so that the loader could be loaded.

What is motivation or use case for adding/changing the behavior?

It looks like loader-runner supports loaders authored with ESM (see webpack/loader-runner#40). I'm assuming that means that webpack will eventually support ESM loaders. I'm opening this issue to get confirmation on that or to hear if anybody has looked into it.

How should this be implemented in your opinion?

If a loader's package.json has "type": "module", webpack should set the loader.type to module for loader-runner.

Are you willing to work on this yourself?

Sure (with guidance).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions