Skip to content

Commit

Permalink
Pyodide loading update test
Browse files Browse the repository at this point in the history
  • Loading branch information
LachlanBWWright committed Nov 27, 2024
1 parent fb8a2e4 commit 3c71b08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pangea RS Edit</title>
<script src="https://cdn.jsdelivr.net/pyodide/v0.26.2/full/pyodide.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/pyodide/v0.26.2/full/pyodide.js"></script> -->
</head>
<body>
<div id="root"></div>
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { MapPrompt } from "./editor/MapPrompt";
function App() {
const [pyodide, setPyodide] = useState<PyodideInterface | null>(null);
useEffect(() => {
loadPyodide().then(async (pyodide) => {
loadPyodide({
indexURL: "https://cdn.jsdelivr.net/pyodide/v0.26.2/full/",
}).then(async (pyodide) => {
await pyodide.loadPackage(rsrcDumpUrl);
await pyodide.runPythonAsync("import rsrcdump");
setPyodide(pyodide);
Expand Down

0 comments on commit 3c71b08

Please sign in to comment.