Packages

loader-utils

3.3.1 · 5 Jun 2024MIT66.9M / weekRepositoryHomepagenpmAtom feed

Your version

3.0.0

major20 Oct 2021Where it was published

3.3.1 is the newest release of 3.x.

In short

10 breaking1 fixed

  • Breaking

    Minimum supported Node.js version is 12.13.0

  • Breaking

    Use xxhash64 by default for [hash]/[contenthash] and getHashDigest API

  • Breaking

    emoji: Was removed without replacements, please use custom function if you need this

  • Breaking

    Removed getOptions in favor loaderContext.getOptions (loaderContext is this inside loader function), note - special query parameters like ?something=true is not supported anymore, if you need this please do it on loader side, but we strongly recommend avoid it, as alternative you can use ?something=1 and handle 1 as true

  • Breaking

    Removed getRemainingRequest in favor loaderContext.remainingRequest (loaderContext is this inside loader function)

  • Breaking

    Removed getCurrentRequest in favor loaderContext.currentRequest (loaderContext is this inside loader function)

  • Breaking

    Removed parseString in favor JSON.parse

  • Breaking

    Removed parseQuery in favor new URLSearchParams(loaderContext.resourceQuery.slice(1)) where loaderContext is this in loader function

Security

2 advisories affect 3.0.0; 3.2.1 fixes them

Release note

Breaking changes

  • Breaking

    Minimum supported Node.js version is 12.13.0

  • Breaking

    Use xxhash64 by default for [hash]/[contenthash] and getHashDigest API

  • Breaking

    emoji: Was removed without replacements, please use custom function if you need this

  • Breaking

    Removed getOptions in favor loaderContext.getOptions (loaderContext is this inside loader function), note - special query parameters like ?something=true is not supported anymore, if you need this please do it on loader side, but we strongly recommend avoid it, as alternative you can use ?something=1 and handle 1 as true

  • Breaking

    Removed getRemainingRequest in favor loaderContext.remainingRequest (loaderContext is this inside loader function)

  • Breaking

    Removed getCurrentRequest in favor loaderContext.currentRequest (loaderContext is this inside loader function)

  • Breaking

    Removed parseString in favor JSON.parse

  • Breaking

    Removed parseQuery in favor new URLSearchParams(loaderContext.resourceQuery.slice(1)) where loaderContext is this in loader function

  • Breaking

    Removed stringifyRequest in favor JSON.stringify(loaderContext.utils.contextify(this.context, request)) (loaderContext is this inside loader function), also it will be cachable and faster

  • Breaking

    isUrlRequest ignores only absolute URLs and #hash requests, data URI and root relative request are handled as requestable due webpack v5 support them

Bug Fixes

  • Allowed the interpolateName API works without options

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.