Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support [hash] in spriteFilename when extracting (Feature Request) #111

Closed
wanecek opened this issue May 11, 2017 · 2 comments
Closed

Support [hash] in spriteFilename when extracting (Feature Request) #111

wanecek opened this issue May 11, 2017 · 2 comments
Assignees
Milestone

Comments

@wanecek
Copy link
Contributor

wanecek commented May 11, 2017

To handle caching of the sprite, it would be useful to be able to include a [hash] in the filename of the sprite.

What would it take to implement this? How can I assist?

@kisenka kisenka modified the milestone: 2.1 May 11, 2017
@kisenka
Copy link
Contributor

kisenka commented May 11, 2017

@wanecek it already supported in svg-sprite-loader@beta as [spritehash], e.g:

module.exports = {
  module: {
    rules: [
      {
        test: /\.svg$/,
        loader: 'svg-sprite-loader',
        options: {
          spriteFilename: '[chunkname].[spritehash].svg'
          // or as a part of query param
          // spriteFilename: '[chunkname].svg?[spritehash]'
        }
      }
    ]
  }
}

Please note: in 2.1.0 it will be renamed to [hash]

@kisenka kisenka self-assigned this May 11, 2017
@kisenka
Copy link
Contributor

kisenka commented May 11, 2017

Closing this as duplicate of #98

@kisenka kisenka closed this as completed May 11, 2017
kisenka added a commit that referenced this issue May 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants