Skip to content

How webpack-assets-manifest plugin defines names of assets? #267

Answered by webdeveric
krutoo asked this question in Q&A
Discussion options

You must be logged in to vote

@krutoo I get data from compilation.getAssets() and use that to determine what goes in the assets manifest. Some assets do not have info.sourceFilename since they are generated files. In that case, I use the name reported from getAssets().

const assets = compilation.getAssets().filter(

const name = sourceFilename ?
( contextRelativeKeys ? sourceFilename : path.basename( sourceFilename ) ) :
asset.name;

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@krutoo
Comment options

@webdeveric
Comment options

@krutoo
Comment options

@webdeveric
Comment options

Answer selected by krutoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants