-
Notifications
You must be signed in to change notification settings - Fork 63
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(plugin-core): support minified url creation with pathname in assetUrl #1248
fix(plugin-core): support minified url creation with pathname in assetUrl #1248
Conversation
@@ -81,7 +82,9 @@ export async function buildBodyForSourcemapUpload( | |||
): Promise<FormData> { | |||
const form = new FormData() | |||
|
|||
const minifiedUrl = new URL(sourcemapData.jsFilename, hbOptions.assetsUrl).href | |||
const url = new URL(hbOptions.assetsUrl) |
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 is strange, the second parameter of URL() constructor is the baseUrl, so it shouldn't be replacing it.
I will test this on a nextjs project as well.
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.
I confirm that the second parameter of the URL constructor will strip out any pathnames in the string.
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.
Thanks!
@@ -81,7 +82,9 @@ export async function buildBodyForSourcemapUpload( | |||
): Promise<FormData> { | |||
const form = new FormData() | |||
|
|||
const minifiedUrl = new URL(sourcemapData.jsFilename, hbOptions.assetsUrl).href | |||
const url = new URL(hbOptions.assetsUrl) |
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.
I confirm that the second parameter of the URL constructor will strip out any pathnames in the string.
This should be fixed with @honeybadger-io/nextjs@5.8.4! |
Status
READY
Description
honeybadger-io/next
suggest to set the assetUrl tohttps://my-app.vercel.app/_next
(link)However, the plugin-core uses the
URL
class in a way that does not support this. Instead of overwriting the assetsUrl pathname, this PR joins them.Steps to Test or Reproduce
_next
in the pathname