mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-19 14:36:22 -05:00
ASCII STL files preview again (#948)
react-stl-viewer pins three-stdlib 2.17.2, whose STLLoader decodes ASCII STL files with three's LoaderUtils.decodeText. three removed that function, so every ASCII STL preview failed while binary STLs (which never decode text) still worked. Override three-stdlib to 2.36.1, which ships its own decodeText. Jest can now load three: a small transform converts three/three-stdlib ES modules to CommonJS without babel-preset-react-app, whose class-properties plugin rejects three's static class blocks at our pinned Babel version. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
20439437f8
commit
e5987fdd7e
4 changed files with 103 additions and 240 deletions
|
|
@ -70,8 +70,11 @@
|
|||
"webpack-dev-server": "^5.2.7"
|
||||
},
|
||||
"jest": {
|
||||
"transform": {
|
||||
"^.+\\.(js|jsx|mjs|cjs|ts|tsx)$": "<rootDir>/jest/babelTransform.js"
|
||||
},
|
||||
"transformIgnorePatterns": [
|
||||
"node_modules/(?!(react-hotkeys-hook)/)"
|
||||
"node_modules/(?!(react-hotkeys-hook|three|three-stdlib)/)"
|
||||
]
|
||||
},
|
||||
"overrides": {
|
||||
|
|
@ -91,9 +94,10 @@
|
|||
"@babel/template": "7.28.6",
|
||||
"@babel/traverse": "7.29.0",
|
||||
"@babel/types": "7.29.0",
|
||||
"fork-ts-checker-webpack-plugin": "^6.5.3",
|
||||
"react-scripts": {
|
||||
"typescript": "$typescript"
|
||||
},
|
||||
"fork-ts-checker-webpack-plugin": "^6.5.3"
|
||||
"three-stdlib": "2.36.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue