You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have generated the bundle as per browser-esm-esbuild and it runs fine with the included index.html.
build.js bundles index.js in the final bundled file.
The result is that importing the bundled index.js, it will look for document.getElementById('container') and runs into error if not found.
If found, it creates a new editor instance.
Neither of the above are desirable as the goal is to create a new editor in a different HTML document.
If I set bundle: false, in build.js, esbuild no longer includes all the necessary files`.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have generated the bundle as per browser-esm-esbuild and it runs fine with the included
index.html
.build.js bundles index.js in the final bundled file.
The result is that importing the bundled
index.js
, it will look fordocument.getElementById('container')
and runs into error if not found.If found, it creates a new editor instance.
Neither of the above are desirable as the goal is to create a new editor in a different HTML document.
If I set
bundle: false,
inbuild.js
, esbuild no longer includes all the necessary files`.What is the proper way to handle this situation?
Beta Was this translation helpful? Give feedback.
All reactions