-
Notifications
You must be signed in to change notification settings - Fork 11
Add support for placeholders in chunk names #20
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
Add support for placeholders in chunk names #20
Conversation
Looks good. Can you add something to the |
Done, tell me if it's clear enough |
index.js
Outdated
module.exports.pitch = function(remainingRequest) { | ||
this.cacheable && this.cacheable(); | ||
var query = loaderUtils.parseQuery(this.query); | ||
var chunkName = loaderUtils.interpolateName(this, 'routes/' + query.name, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For backwards compatibility, should we check the existence of a [
in the name? Using the example from the readme, if an existing user had ?name=user
, their behavior would now change. But maybe that doesn't matter. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking maybe automatically putting the chunks in a subfolder by default is a bad idea, would maybe be better to just leave behavior unchanged but mention how to do that in the README?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that would be better.
@seanadkinson done |
Good stuff @Anahkiasen. Let me pull this down and do some quick testing, and as long as its backwards compatible I'll push an update. |
Published |
Closes #19