Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

feature(injector): filename template #34

Merged

Conversation

kevinchappell
Copy link
Contributor

@kevinchappell kevinchappell commented Jan 17, 2018

Added: Customizable filename with placeholder template string

What it do

Provides additional customization to manifest.json filename, allowing developer to remove or customize hash (fingerprint), extension and name.

Usage:

const options = {
  filename: '[name].[hash:8][ext]'
}
// then
new WebpackPwaManifest(options)

filename output

manifest.12345678.json

Added: Customizable filename with placeholder template string

@kevinchappell
@arthurbergmz arthurbergmz merged commit 172ec53 into arthurbergmz:master Jan 17, 2018
@arthurbergmz
Copy link
Owner

Thank you!

It will be available soon, with a couple of changes that I'll make for the next release.

@kevinchappell
Copy link
Contributor Author

Excellent, thank you!

@kevinchappell kevinchappell deleted the feature/filename-template branch January 17, 2018 22:43
value: (match, limit = ':32') => {
const hash = generateFingerprint(json)
limit = hash.length - parseInt(limit.substr(1), 10)
return hash.substr(limit)
Copy link
Contributor Author

@kevinchappell kevinchappell Jan 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i made a mistake here. have opened #35 to fix it

@fernandopasik
Copy link

fernandopasik commented Jan 26, 2018

@arthurbergmz would it be possible to publish a new release to have this fantastic feature?

@arthurbergmz
Copy link
Owner

@fernandopasik Please, update to v3.5.0!

@fernandopasik
Copy link

@arthurbergmz, it worked great! Thanks for the hard work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants