loader-utils icon indicating copy to clipboard operation
loader-utils copied to clipboard

Feature request: stringify loader object

Open MunGell opened this issue 7 years ago • 4 comments

Hi there,

I am working on a loader that needs to compile an array of loaders and options into one string.

I've noticed that vue-loader authors have implemented similar functionality in their code base: vue-loader/lib/loader.js.

I am wondering if this is something that could be part of loader-utils since it could be a helpful function for other loaders as well?

I can create a PR with tests if there will be a need for this helper function.

MunGell avatar Jul 23 '17 08:07 MunGell

I second this. Would you like to create a PR?

ishitatsuyuki avatar Dec 17 '17 09:12 ishitatsuyuki

PR welcome

alexander-akait avatar Dec 21 '18 12:12 alexander-akait

Now the config loaders is moved to use, maybe the name should be sth like stringifyUseEntries, and assume the param to be UseEntry[]?

ljqx avatar Jan 07 '19 08:01 ljqx

@ljqx we can discuss about name in a PR, feel free to send a PR

alexander-akait avatar Jan 09 '19 09:01 alexander-akait