feat: allow the option filename to be a function #143
Closed
Comments
PR welcome |
Ok, I'm on it. Quick question, at the moment I can't get the tests passing, I'm getting |
Duplicate of #67? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can we allow the filename and chunkFilename passed in trought the constructor to be functions instead of string only?
In our case it would make it easy to toggle the [hashcontent] for some bundles.
We would pass the option as followed:
filename: (chunk) => chunk.name === "NotHashedBundle" ? '[name].css' : '[name].[contenthash].css'
Might be worth noting that the latest version of webpack also supports something simular to this in their output.
eg:
filename: (data) => data.chunk.name === "NotHashedBundle" ? '[name].js' : '[name].[chunkhash].js'
The text was updated successfully, but these errors were encountered: