-
-
Notifications
You must be signed in to change notification settings - Fork 40
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: crash when using filesystem cache #460
Conversation
ABSOLUTE_URL_REGEX.test(this.resourcePath) && | ||
!WINDOWS_PATH_REGEX.test(this.resourcePath) | ||
? this.resourcePath | ||
: this.utils.contextify(this.rootContext, this.resourcePath); |
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.
The filename
must be a relative path
without leading ./
:
- this.utils.contextify(this.rootContext, this.resourcePath) =>
./src/image.svg
(❌ wrong filename) - path.relative(this.rootContext, this.resourcePath) =>
src/image.svg
(✅ correct filename)
Please, see the details in my updated comment
I have linked the NEW small as possible repo with reproducible issue.
Thank you!
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.
this PR doesn't fix the issue
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.
strange, I'll have a look now
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.
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.
Now with tests 😄
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.
it works now :-)
thank you!
This PR contains a:
Motivation / Use-Case
fixes #458
fixes #459
Breaking Changes
No
Additional Info
Let's refactor to avoid misleading logic, because we need it only for URLs, also let's cache this