Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Pass additional assetInfo object when calling emitFile #382

@bschlenk

Description

@bschlenk
  • Operating System: MacOS
  • Node Version: 12.6.1
  • NPM Version: 6.14.7
  • webpack Version: 4.29.6
  • file-loader Version: 3.0.1

Feature Proposal

Webpack loader's emitFile call takes a 4th param that can provide additional info about an asset, like whether it is immutable or not. file-loader should pass in { immutable: true } when the file name includes [contenthash] so that other plugins can benefit from this info.

The new assetInfo param was added in webpack/webpack#9038.

Feature Use Case

I'm writing a plugin that uses this info to determine what cache-control headers a file can be given.

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