sandpack-client 1.1.0
Install from the command line:
Learn more about npm packages
$ npm install @codesandbox/sandpack-client@1.1.0
Install via package.json:
"@codesandbox/sandpack-client": "1.1.0"
About this version
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 { SandpackClient } from "@codesandbox/sandpack-client";
const client = new SandpackClient("#preview", {
files: {
"/index.js": {
code: `console.log(require('uuid'))`,
},
},
entry: "/index.js",
dependencies: {
uuid: "latest",
},
});