-
-
Notifications
You must be signed in to change notification settings - Fork 6.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: worker relative base should use import.meta.url #9204
Conversation
return { | ||
runtime: `new URL(${JSON.stringify( | ||
path.posix.relative(path.dirname(importer), filename) | ||
)},import.meta.url).href` |
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.
Nit:
)},import.meta.url).href` | |
)}, import.meta.url).href` |
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.
Oh. Is the return value supposed to be minified output, where that space is intentionally omitted?
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.
Yes, but I think we could add the space. It will be minified later 👍🏼
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.
Actually we should review all these if we do in a separate PR (there are several snippets like this in the code base)
playground/worker/__tests__/relative-base/relative-base-worker.spec.ts
Outdated
Show resolved
Hide resolved
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.
Other than @tony19's comment of the console.log
, this looks good to me
Co-authored-by: Tony Trinh <[email protected]>
Description
Fixes bug report 2. at:
From that comment:
What is the purpose of this pull request?