Skip to content
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

esbuild configuration: webworker support #335

Open
timbomckay opened this issue Sep 3, 2022 · 0 comments
Open

esbuild configuration: webworker support #335

timbomckay opened this issue Sep 3, 2022 · 0 comments

Comments

@timbomckay
Copy link

I'm trying to get an 11ty with esbuild structure setup to use playground-elements in a component-library monorepo and am struggling to get esbuild to work.

I get the "Failed to construct 'URL'" error and struggled to figure this out for a couple hours until I finally found the Bundling documentation where it calls out the file in question within the Other section. I updated my esbuild config to include the file in question via:

config.addPassthroughCopy({ "node_modules/playground-elements/playground-typescript-worker.js": "playground-typescript-worker.js" })

It's in the same directory as my main.js file but I'm still getting the error.

When I noticed that webpack 5 has worker support builtin I thought I'd check esbuild and found this web worker issue. I don't see any resolution in there and not sure if there's something else I should be doing or if esbuild isn't compatible at this time.

If anyone has any advice it'd be greatly appreciated.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant