mirror of https://github.com/pyodide/pyodide.git
FIX for webpack: Export binary files in javascript package (#3085)
This adds the distributed binary files to the "exports" section of the package.json file. This allows the files to be referenced, e.g. by `require.resolve('pyodide/distutils.tar')` which is useful for tools like webpack.
This commit is contained in:
parent
4dd8a3e0cb
commit
39522cd83a
|
@ -44,6 +44,9 @@ substitutions:
|
|||
`indexURL` (this was a regression in v0.21.2).
|
||||
{pr}`3077`
|
||||
|
||||
- {{ Enhancement }} Add binary files to exports in JavaScript package
|
||||
{pr}`3085`.
|
||||
|
||||
- {{ Enhancement }} Pyodide now works with a content security policy that
|
||||
doesn't include `unsafe-eval`. It is still necessary to include
|
||||
`wasm-unsafe-eval` (and probably always will be). Since current Safari
|
||||
|
|
|
@ -51,6 +51,11 @@
|
|||
"require": "./pyodide.js",
|
||||
"import": "./pyodide.mjs"
|
||||
},
|
||||
"./distutils.tar": "./distutils.tar",
|
||||
"./pyodide.asm.wasm": "./pyodide.asm.wasm",
|
||||
"./pyodide.asm.js": "./pyodide.asm.js",
|
||||
"./pyodide.asm.data": "./pyodide.asm.data",
|
||||
"./pyodide_py.tar": "./pyodide_py.tar",
|
||||
"./pyodide.mjs": "./pyodide.mjs",
|
||||
"./pyodide.js": "./pyodide.js",
|
||||
"./package.json": "./package.json",
|
||||
|
|
Loading…
Reference in New Issue