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

🚀 Feature Request: Add support for shims when no-bundling is applied #3074

Closed
dario-piotrowicz opened this issue Apr 19, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@dario-piotrowicz
Copy link
Member

Describe the solution

When the --no-bundle flag is used for building a worker we don't apply our shims like for example the D1 one or the sites/assets ones.

This makes it impossible for example not to bundle a worker but still use sites in it.

We need a way to provide such shims as this would make for example using lazy loading extremely limited.

@dario-piotrowicz dario-piotrowicz added the enhancement New feature or request label Apr 19, 2023
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Apr 19, 2023
@dario-piotrowicz
Copy link
Member Author

dario-piotrowicz commented Apr 19, 2023

For example the Nuxt team would like to use dynamic imports in their worker adaptor: nitrojs/nitro#1172
but that is going to be blocked until we can find a solution that enables the use of sites with no-bundle 😓

cc. @danielroe

@IgorMinar
Copy link
Contributor

Can we please do this for wrangler pages as well while we are at it? Soon we won't need to do this twice, but in the meantime thank you for putting up with the hassle... 🧡

@GregBrimble
Copy link
Member

Related: #2966

@mrbbot
Copy link
Contributor

mrbbot commented Aug 14, 2023

As a quick update, #3595 removed the D1 shim from Wrangler, allowing it to be used with --no-bundle. This doesn't solve the problem completely, but it does move us in the right direction.

@mrbbot mrbbot moved this from Untriaged to Backlog in workers-sdk Aug 14, 2023
@IgorMinar
Copy link
Contributor

Does #3726 WIP PR address this feature request?

@mrbbot
Copy link
Contributor

mrbbot commented Aug 17, 2023

@IgorMinar yes, I believe so. You should be able to enable bundling, but then specify a set of modules you don't want to be bundled. 👍

@penalosa
Copy link
Contributor

Closed by #3726

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

No branches or pull requests

5 participants