mirror of https://github.com/pyodide/pyodide.git
Keep webpackIgnore comments in pyodide.js (#4294)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
fd270ddde7
commit
8dc568ffa8
|
@ -17,6 +17,7 @@ __pycache__
|
|||
.pytest_cache/
|
||||
.vscode
|
||||
.venv*
|
||||
tsconfig.tsbuildinfo
|
||||
|
||||
build
|
||||
ccache
|
||||
|
|
2
Makefile
2
Makefile
|
@ -133,7 +133,7 @@ node_modules/.installed : src/js/package.json src/js/package-lock.json
|
|||
touch node_modules/.installed
|
||||
|
||||
dist/pyodide.js src/js/generated/_pyodide.out.js: src/js/*.ts src/js/generated/pyproxy.ts node_modules/.installed
|
||||
cd src/js && npm run tsc && node esbuild.config.mjs && cd -
|
||||
cd src/js && npm run build && cd -
|
||||
|
||||
src/core/stack_switching/stack_switching.out.js : src/core/stack_switching/*.mjs
|
||||
node src/core/stack_switching/esbuild.config.mjs
|
||||
|
|
|
@ -23,6 +23,9 @@ myst:
|
|||
- {{ Fix }} Fixed default indexURL calculation in Node.js environment.
|
||||
{pr}`4288`
|
||||
|
||||
- {{ Fix }} Fixed a bug that webpack messes up dynamic import of `pyodide.asm.js`.
|
||||
{pr}`4294`
|
||||
|
||||
- {{ Enhancement }} Added experimental support for stack switching.
|
||||
{pr}`3957`, {pr}`3964`, {pr}`3987`, {pr}`3990`, {pr}`3210`
|
||||
|
||||
|
|
|
@ -95,6 +95,9 @@ try {
|
|||
`try{Object.assign(exports,${name})}catch(_){}\nglobalThis.${name}=${name}.${name};\n//# sourceMappingURL`,
|
||||
);
|
||||
|
||||
// inject webpackIgnore comments
|
||||
content = content.replaceAll("import(", "import(/* webpackIgnore */");
|
||||
|
||||
writeFileSync(outfile, content);
|
||||
}
|
||||
} catch ({ message }) {
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
"ws": false
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc --noEmit && node esbuild.config.mjs",
|
||||
"test": "npm-run-all test:*",
|
||||
"test:unit": "cross-env TEST_NODE=1 ts-mocha --node-option=experimental-loader=./test/loader.mjs --node-option=experimental-wasm-stack-switching -p tsconfig.test.json test/unit/**/*.test.*",
|
||||
"test:node": "cross-env TEST_NODE=1 mocha test/integration/**/*.test.js",
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"module": "ES2022",
|
||||
"moduleResolution": "node",
|
||||
"composite": true,
|
||||
"tsBuildInfoFile": "tsconfig.tsbuildinfo",
|
||||
"strict": true,
|
||||
"noUnusedLocals": false,
|
||||
"types": ["node"],
|
||||
|
|
Loading…
Reference in New Issue