We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11708c7 commit 8c4846bCopy full SHA for 8c4846b
src/utils.js
@@ -68,7 +68,17 @@ function isRelativePath(str) {
68
return RELATIVE_PATH_REGEXP.test(str);
69
}
70
71
+// TODO simplify for the next major release
72
function stringifyRequest(loaderContext, request) {
73
+ if (
74
+ typeof loaderContext.utils !== "undefined" &&
75
+ typeof loaderContext.utils.contextify === "function"
76
+ ) {
77
+ return JSON.stringify(
78
+ loaderContext.utils.contextify(loaderContext.context, request)
79
+ );
80
+ }
81
+
82
const splitted = request.split("!");
83
const { context } = loaderContext;
84
0 commit comments