2.9.0-bugfix-undefined-startRoute • Published 6 months ago

@davidmccabe/sandpack-client v2.9.0-bugfix-undefined-startRoute

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

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