This repository was archived by the owner on Dec 17, 2025. It is now read-only.
Feature: add compiler output options support for hash#120
Open
aarefiev wants to merge 5 commits intowebpack:masterfrom
Open
Feature: add compiler output options support for hash#120aarefiev wants to merge 5 commits intowebpack:masterfrom
aarefiev wants to merge 5 commits intowebpack:masterfrom
Conversation
alexander-akait
suggested changes
Dec 21, 2018
Member
alexander-akait
left a comment
There was a problem hiding this comment.
We need implement api for hash* options for loader api, feel free to open issue or better send a PR
| } | ||
| } | ||
| let url = filename; | ||
| const compilationOutputOptions = loaderContext._compilation && loaderContext._compilation.outputOptions || {}; |
Member
There was a problem hiding this comment.
It is private properties and don't use their, you need open issue in webpack with feature request provide this option throw api
Member
There was a problem hiding this comment.
@aarefiev can you create issue so that we don't lose this problem if it require time?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Good day, guys!
Yesterday I worked on configuring webpack for my own project and I found that I can't use the same output filename settings for all loaders. Especially, for file-loader.
Here is the part of webpack.config.js:
After compilation I found that the hash part of name of extracted css and bundled files are truncated, but all other assets that I uploaded as is with file-loader are not truncated. As solution, I should pass
maxLengthtooptions.name(in format[name].[hash:8].[ext]) and it will work as I expected.I think it is not good because I should pass the same settings for each loader, maybe is better to support compiler settings as it support MiniCssExtractPlugin.
What you think about it?