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

Async imports from workers don't work: 'Cannot find module' #5503

Closed
mischnic opened this issue Dec 19, 2020 · 0 comments · Fixed by #6582
Closed

Async imports from workers don't work: 'Cannot find module' #5503

mischnic opened this issue Dec 19, 2020 · 0 comments · Fixed by #6582

Comments

@mischnic
Copy link
Member

mischnic commented Dec 19, 2020

🐛 bug report

🤔 Expected Behavior

The entry asset of the async bundle should be registered into parcelRequire

😯 Current Behavior

  • Uncaught (in promise) Error: Cannot find module '6CLGt'

💁 Possible Solution

I think isAssetReferencedByDependant is wrong? There is no parcelRequire.register() in the async bundle

💻 Code Sample

parcel build index.html

<script src="index.js"></script>
// index.js
new Worker("./worker.js");

// worker.js
import("./async.js").then((v) => console.log("worker: async=", v));

// async.js
export const async = "async!";

🌍 Your Environment

Software Version(s)
Parcel f89e5ef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants