mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-30 12:05:39 -05:00
refactor(client): allow TS worker to initialize itself and have the client check readiness (#57055)
This commit is contained in:
committed by
GitHub
parent
e32c3d9a11
commit
c7936b44b9
@@ -1,5 +1,10 @@
|
||||
// We have to specify pyodide.js because we need to import that file (not .mjs)
|
||||
// and 'import' defaults to .mjs
|
||||
// and 'import' defaults to .mjs.
|
||||
|
||||
// This is to do with how webpack handles node fallbacks - it uses the node
|
||||
// resolution algorithm to find the file, but that requires the full file name.
|
||||
// We can't add the extension, because it's in a bundle we're importing. However
|
||||
// we can import the .js file and then the strictness does not apply.
|
||||
import { loadPyodide, type PyodideInterface } from 'pyodide/pyodide.js';
|
||||
import pkg from 'pyodide/package.json';
|
||||
import type { PyProxy, PythonError } from 'pyodide/ffi';
|
||||
|
||||
Reference in New Issue
Block a user