We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
parcel [serve] --lazy
parcel [serve] fails to load an async bundle under the following conditions:
parcel [serve]
--lazy
These conditions seem exhaustive, a minimal repro below reflects that. After the cache is created, the next HMR invocation resolves the issue.
Apart from the --lazy flag, out-of-the-box Parcel.
When the async bundle is requested, Parcel's development server responds with it.
When the async bundle is requested, the server responds with index.html as a fallback instead, and a SyntaxError from failed parsing is thrown.
index.html
SyntaxError
dynamic.51313f62.js:1 Uncaught SyntaxError: Unexpected token '<' index.63aff760.js:61 Uncaught (in promise) Error: Cannot find module 'kmWTC' at newRequire (index.63aff760.js:61:19) at Function.newRequire (index.63aff760.js:45:18) at runtime-647fb96160fc59b6.js:1:248
Might be related to how Parcel initializes the cache.
Faced the issue when tried to dynamically import app-specific devtools under certain conditions only.
https://github.com/rayinaway/lazy-serve-parcel-bug-repro
The text was updated successfully, but these errors were encountered:
This should be fixed by #9093.
Sorry, something went wrong.
No branches or pull requests
🐛 bug report
parcel [serve]
fails to load an async bundle under the following conditions:--lazy
flag is set.These conditions seem exhaustive, a minimal repro below reflects that. After the cache is created, the next HMR invocation resolves the issue.
🎛 Configuration
Apart from the
--lazy
flag, out-of-the-box Parcel.🤔 Expected Behavior
When the async bundle is requested, Parcel's development server responds with it.
😯 Current Behavior
When the async bundle is requested, the server responds with
index.html
as a fallback instead, and aSyntaxError
from failed parsing is thrown.💁 Possible Solution
Might be related to how Parcel initializes the cache.
🔦 Context
Faced the issue when tried to dynamically import app-specific devtools under certain conditions only.
💻 Code Sample
https://github.com/rayinaway/lazy-serve-parcel-bug-repro
🌍 Your Environment
The text was updated successfully, but these errors were encountered: