@codesandbox/sandpack-client

v0.3.8-alpha.4
A bundler that completely works in the browser and takes advantage of it.

Component toolkit for live running code editing experiences

Sandpack client

This is a small foundation package that sits on top of the bundler. It is framework agnostic and facilitates the handshake between your context and the bundler iframe.

import { loadSandpackClient } from "@codesandbox/sandpack-client";

const main = async () => {
  const client = await loadSandpackClient("#preview", {
    files: {
      "/index.js": {
        code: `console.log(require('uuid'))`,
      },
    },
    entry: "/index.js",
    dependencies: {
      uuid: "latest",
    },
  });
}

Read more

npm i @codesandbox/[email protected]

Metadata

  • GPL-2.0
  • Whatever
  • CodeSandbox
  • released 11/16/2021

Downloads