Git Product home page Git Product logo

vitepress-plugin-sandpack's Introduction

knowledge is infinite. ☕🙌🥳💻

made-with-javascript made-with-javascript

博客备用地址

GitHub followers

node version

>=17

Sponsor

Special Sponsor

special sponsor appwrite

vitepress-plugin-sandpack's People

Contributors

jerrywu001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vitepress-plugin-sandpack's Issues

Custom layout

Hi @jerrywu001 !

Thanks for this great plugin.

I want to use a custom layout for Sandpack. In my case, I want to display the editor above the results, instead of the default side-by-side. Is this possible with vitepress-plugin-sandpack?

Local dependencies

Hi, thank you for this library.

How can we import local dependencies similar to what we have here:
https://sandpack.codesandbox.io/docs/guides/local-dependencies

similar to the below:

import designSystemRaw from "../design-system/build-sandpack?raw";
 
<Sandpack
  files={{
    "/App.tsx": `import { Button, Tag } from "@internals/ds";
 
export default function Sample() {
  return (
    <>
      <Button type="primary">Button1</Button>
      <Button type="secondary">Button2</Button>
      <Tag>Tag</Tag>
    </>
  );
}
`,
    "/node_modules/@internals/design-system/package.json": {
      hidden: true,
      code: JSON.stringify({
        name: "@design-system",
        main: "./index.js",
      }),
    },
    "/node_modules/@internals/design-system/index.js": {
      hidden: true,
      code: designSystemRaw,
    },
  }}
  template="react-vite"
/>

Loading a local JS file

May I ask if it is possible to load a local JS file for display? If so, how can I use this feature?

online demo 运行报错

image
  "devDependencies": {
    "vitepress": "1.0.0-beta.7",
    "vitepress-plugin-sandpack": "^0.3.0",
    "vue": "^3.3.4"
  },

请问一下是什么问题

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.