-
-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Description
Hello,
I would like to sugget parsing a Number
in the value of a query parameter used to set options of a loader.
if (specialValues.hasOwnProperty(value)) {
value = specialValues[value];
- }
+ } else if (/^\d$/.test(value) {
+ value = Number(value)
+ }
loader-utils/lib/parseQuery.js
Line 39 in d9f4e23
if (specialValues.hasOwnProperty(value)) { |
Is there a reason to parse a Boolean
but not a Number
? Performances?
Eg. css-loader?importLoaders=true
works but not css-loader?importLoaders=1
.
Note that having css-loader?importLoaders=true
not throwing an error is also confusing, since the css-loader
doc states that only a Number
is expected. Please feel free to ask me to create a new issue in the related repository.
Metadata
Metadata
Assignees
Labels
No labels