vite-plugin-pyodide
v0.0.15
Published
Vite plugin that copy Python scripts into Pyodide virtual FS.
Downloads
3
Readme
vite-plugin-pyodide
Copy your python .py files into pyodide.FS
Usage
Install with npm install vite-plugin-pyodide
// vite.config.ts
export default defineConfig({
plugins: [
pyodidePlugin({ pythonFilesPath: "./python" }),
...
// vite-env.d.ts
/// <reference types="vite-plugin-pyodide" />
import { setupPyodideFiles } from "virtual:pyodide-files";
pyodide = await loadPyodide();
await setupPyodideFiles(pyodide);