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

🐛 BUG: Dynamic variable chunk imports aren't found when using _worker.js/ directory #3148

Closed
GregBrimble opened this issue May 5, 2023 · 0 comments · Fixed by #3175
Closed
Assignees
Labels
bug Something that isn't working pages Relating to Pages

Comments

@GregBrimble
Copy link
Member

Which Cloudflare product(s) does this pertain to?

Pages

What version of Wrangler are you using?

latest

What operating system are you using?

macOS

Describe the Bug

Related to #2966.

If you wrangler pages dev ./dist where ./dist/_worker.js/index.js dynamically imports a chunk (e.g. await import(url.pathname), the chunk cannot be found. This is because the copy-modules-over-to-the-temporary-working-directory-where-we-build-functions logic is only run in bundle mode when collecting modules. We need to also copy over any additional modules that were discovered in the traversing of the module graph that ran first.

This doesn't affect prod.

@GregBrimble GregBrimble added pages Relating to Pages bug Something that isn't working labels May 5, 2023
@GregBrimble GregBrimble self-assigned this May 5, 2023
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk May 5, 2023
@github-project-automation github-project-automation bot moved this from Untriaged to Done in workers-sdk May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working pages Relating to Pages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant