-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
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).