-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Virtual routing fix #224
Virtual routing fix #224
Conversation
Add new improvements
Add all new commits
You are on fire @DeMoorJasper! 🙌👏 Sent with GitHawk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a test please?
src/assets/HTMLAsset.js
Outdated
@@ -45,6 +45,10 @@ class HTMLAsset extends Asset { | |||
if (node.attrs) { | |||
for (let attr in node.attrs) { | |||
let elements = ATTRS[attr]; | |||
// link is not a file | |||
if (node.tag === 'a' && node.attrs[attr].lastIndexOf('.') < 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should just ignore all absolute paths within HTML instead? so just check if the first character is /
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this also break any absolute path require, (this has already been reported as a bug)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why you'd want to require an absolute path so this might be ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflicts, too. 😬
Conflicts have been fixed @brandon93s |
* run prettier * potential fix * fix relative paths * switch to last index to still support relative paths on legit assets * add test * fix failing test
* run prettier * potential fix * fix relative paths * switch to last index to still support relative paths on legit assets * add test * fix failing test
potential fix for closes #211