Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,17 @@ function isRelativePath(str) {
return RELATIVE_PATH_REGEXP.test(str);
}

// TODO simplify for the next major release
function stringifyRequest(loaderContext, request) {
if (
typeof loaderContext.utils !== "undefined" &&
typeof loaderContext.utils.contextify === "function"
) {
return JSON.stringify(
loaderContext.utils.contextify(loaderContext.context, request)
);
}

const splitted = request.split("!");
const { context } = loaderContext;

Expand Down