sandpack
sandpack copied to clipboard
Executing <head> scripts and appending content to the bundler html
Because the bundler is a static build with a predefined html, we cannot serve the entry html of each sandpack, the same way codesandbox does. Hence, the
tags don't get added to the page when running sandpack. This was signaled already in #32, we had a fix for it, but it was breaking some existing behavior in codesandbox. But even if we copy the head tags individually, the scripts do not get executed. This was signaled in #40. Plus, it might be too late for events likeonload
to be triggered in those scripts. Hence we need a solution for executing that as soon as possible.
Needs https://github.com/codesandbox/codesandbox-client/pull/5723 to be merged before a new fix version can finally solve this
It should no longer be an issue after Nodebox and static server template