This repository was archived by the owner on Mar 17, 2021. It is now read-only.
fix(utils/normalizeFallback): fallback options behaviour (options.fallback)#145
Merged
alexander-akait merged 1 commit intomasterfrom Aug 17, 2018
Merged
Conversation
08a7a59 to
4858119
Compare
alexander-akait
commented
Aug 16, 2018
| exports[`fallback option {String} (with query) 1`] = `"module.exports={\\"limit\\":-9007199254740991,\\"name\\":\\"fallback-[hash].[ext]\\",\\"unknown\\":\\"fallback-value\\"}"`; | ||
|
|
||
| exports[`fallback option {String} 1`] = `"module.exports={\\"limit\\":-9007199254740991,\\"name\\":\\"[name].[hash].[ext]\\",\\"unknown\\":\\"value\\"}"`; | ||
|
|
Member
Author
There was a problem hiding this comment.
What we do:
- Get original options from
url-loader. - Get fallback options.
- Merge their :
options = Object.assign({}, originalOptions, fallbackOptions);. - delete
options.fallback.
options.fallback)
michael-ciniawsky
approved these changes
Aug 16, 2018
| return normalizeFallbackString('file-loader', originalOptions); | ||
| if (index >= 0) { | ||
| loader = fallback.substr(0, index); | ||
| options = loaderUtils.parseQuery(fallback.substr(index)); |
options.fallback)options.fallback)
Member
Member
Author
|
@michael-ciniawsky I think pass all options is the right solution. Also we provide way to rewrite |
Member
|
Agreed I just thought passing only the custom options defined via |
Member
Author
|
@michael-ciniawsky let's merge this and release new version |
Member
|
Released in |
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.
This PR contains a:
Motivation / Use-Case
fixes #144 fixes #146
Breaking Changes
no
Additional Info
Refactor tests + more tests