-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix template path resolving regexp to support loader query parameters #542
Fix template path resolving regexp to support loader query parameters #542
Conversation
Could you tell a little bit more about the changed regexp? |
Of course, I have described the problem in the issue #541 . |
Can you please also explain the solution? |
Before change, the regular expression /([!])([^/\\][^!?]+|[^/\\!?])(
And the After change, the regular expression /([!])([^/\\][^!?]+|[^/\\!?])($|?[^!?\n]+$)/ (Only need to look at the bold content) will match the following substrings in
And the The key source code of the // Resolve template path
return template.replace(
/([!])([^/\\][^!?]+|[^/\\!?])($|\?[^!?\n]+$)/,
function (match, prefix, filepath, postfix) {
return prefix + path.resolve(filepath) + postfix;
}); |
That's quite smart - thanks a lot 👍 |
Glad you like it :D |
By the way, when do you plan to release the new version? |
Released |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
More details in this issue: #541