sandpack icon indicating copy to clipboard operation
sandpack copied to clipboard

Executing <head> scripts and appending content to the bundler html

Open alexnm opened this issue 3 years ago • 1 comments

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 like onload to be triggered in those scripts. Hence we need a solution for executing that as soon as possible.

alexnm avatar Apr 20 '21 15:04 alexnm

Needs https://github.com/codesandbox/codesandbox-client/pull/5723 to be merged before a new fix version can finally solve this

alexnm avatar May 10 '21 17:05 alexnm

It should no longer be an issue after Nodebox and static server template

danilowoz avatar Apr 03 '23 19:04 danilowoz