Skip to content

Support custom names for chunk and imports file. #2

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

Merged
merged 2 commits into from
May 16, 2016

Conversation

izaakschroeder
Copy link
Contributor

Previously the name of both the split files and the imports file were fixed. For split files they were just the name of the source asset with a -i tacked on; for import files they always overwrote the original asset. Both of these are now customizable using the standard webpack name interpolator; you get things like [name], [ext] and so forth. For the split files you also get an additional [part] value that signifies the current part.

Additionally, this allows for one to generate both the split files and imports as well as keep the original unsplit files. This may be desirable in cases where you only wish to serve the split files to a specific target (i.e. IE) and use the unsplit files everywhere else.

@tchon
Copy link

tchon commented May 16, 2016

LGTM @izaakschroeder

@ananavati
Copy link

👍 LGTM

Previously the name of both the split files _and_ the imports file were fixed. For split files they were just the name of the source asset with a `-i` tacked on; for import files they always overwrote the original asset. Both of these are now customizable using the standard webpack name interpolator; you get things like `[name]`, `[ext]` and so forth. For the split files you also get an additional `[part]` value that signifies the current part.

Additionally, this allows for one to generate both the split files and imports _as well as_ keep the original unsplit files. This may be desirable in cases where you only wish to serve the split files to a specific target (i.e. IE) and use the unsplit files everywhere else.
Cause knowing what things do is good.
@izaakschroeder izaakschroeder merged commit 5d382c4 into master May 16, 2016
@izaakschroeder izaakschroeder deleted the custom-names branch May 16, 2016 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants