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
If you import a .html file from a JS file (either by bundle-text: or new URL() any scripts in the page do not execute.
bundle-text:
new URL(
Scripts in the page execute
Scripts do not execute.
The parameters passed to the Parcel runtime entry function are:
[ /*modules*/ { '(hmrModule)': [ function (require,module,exports) { /* */ }, {} ], '(mainModule)': [ function (require,module,exports) { alert(1) }, {} ] }, /*entry*/ ['(hmrModule)'], /*mainEntry*/ null, /*parcelRequireName*/ 'parcelRequiree764' ]
But if you compare this to the entry-point HTML file, where the runtime entry function is called with:
[ /*modules*/ { /* */ }, /*entry*/ ['(hmrModule)', '(mainModule)'], /*mainEntry*/ '(mainModule)', /*parcelRequireName*/ 'parcelRequiree764' ]
It seems as if the main module is missing from the entry and mainEntry parameters. This might be the cause of the issue?
test.html
<head></head> <body></body> <script type="module"> alert(1) </script>
and then in another JS file
const myHtml = ` <a href="${new URL('./test.html', import.meta.url).href}">Test</a> `
The text was updated successfully, but these errors were encountered:
No branches or pull requests
🐛 bug report
If you import a .html file from a JS file (either by
bundle-text:
ornew URL(
) any scripts in the page do not execute.🤔 Expected Behavior
Scripts in the page execute
😯 Current Behavior
Scripts do not execute.
💁 Possible Solution
The parameters passed to the Parcel runtime entry function are:
But if you compare this to the entry-point HTML file, where the runtime entry function is called with:
It seems as if the main module is missing from the entry and mainEntry parameters. This might be the cause of the issue?
🔦 Context
💻 Code Sample
test.html
and then in another JS file
🌍 Your Environment
The text was updated successfully, but these errors were encountered: