-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feature req: pass through Webpack "magic comments" inside Worker constructor #2439
Comments
Is this behavior documented anywhere? I don't see it on https://webpack.js.org/api/module-methods/#magic-comments or https://webpack.js.org/guides/web-workers/. If it's indeed not documented, then it'd be good for someone to document it so people can find out about them. |
Best I could find was a StackOverflow post referencing the magic comments doc: At least it's in the code: |
Thanks for the fix! |
@benjamind Where did you learn about Webpack's magic comments support in Workers? |
We only encountered it after trying to adopt esbuild in our workflow for TS stripping. I dug into the webpack source to confirm the behavior should have worked. Agree they should publicly document this feature. |
Would you mind opening an issue with Webpack to document the behavior? |
Feature Request
In #309 support was added to pass through Webpack "magic comments" in
import(/* webpackChunkName: "foo" */ './foo.js')
style statements. Webpack also supports these chunk name comments in thenew Worker
constructor syntax:It would be great if this was supported in ESbuild for the same reasons, allowing the esbuild-loader project to work correctly for workers.
The text was updated successfully, but these errors were encountered: