mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 21:33:22 +08:00
Add "react-virtualized"
automatically patch it to remove unnecessary import
This commit is contained in:
parent
b683f75cfa
commit
74cff61824
5843
src/handbook/package-lock.json
generated
Normal file
5843
src/handbook/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -10,12 +10,14 @@
|
|||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
|
|
||||||
|
"postinstall": "npx patch-package",
|
||||||
"lint": "npx prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md}\""
|
"lint": "npx prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md}\""
|
||||||
},
|
},
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
|
"react-virtualized": "^9.22.3",
|
||||||
|
|
||||||
"events": "^3.3.0"
|
"events": "^3.3.0"
|
||||||
},
|
},
|
||||||
@ -23,6 +25,7 @@
|
|||||||
"typescript": "^4.9.3",
|
"typescript": "^4.9.3",
|
||||||
"@types/react": "^18.0.28",
|
"@types/react": "^18.0.28",
|
||||||
"@types/react-dom": "^18.0.11",
|
"@types/react-dom": "^18.0.11",
|
||||||
|
"@types/react-virtualized": "^9.21.21",
|
||||||
"@types/events": "^3.0.0",
|
"@types/events": "^3.0.0",
|
||||||
|
|
||||||
"vite": "^4.2.0",
|
"vite": "^4.2.0",
|
||||||
@ -41,6 +44,7 @@
|
|||||||
"postcss-load-config": "^4.0.1",
|
"postcss-load-config": "^4.0.1",
|
||||||
"postcss-font-magician": "^3.0.0",
|
"postcss-font-magician": "^3.0.0",
|
||||||
|
|
||||||
"prettier": "^2.8.7"
|
"prettier": "^2.8.7",
|
||||||
|
"patch-package": "^6.5.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
10
src/handbook/patches/react-virtualized+9.22.3.patch
Normal file
10
src/handbook/patches/react-virtualized+9.22.3.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
diff --git a/node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js b/node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js
|
||||||
|
index d00f0f1..42456dc 100644
|
||||||
|
--- a/node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js
|
||||||
|
+++ b/node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js
|
||||||
|
@@ -71,4 +71,3 @@ export function unregisterScrollListener(component, element) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-import { bpfrpt_proptype_WindowScroller } from "../WindowScroller.js";
|
||||||
|
\ No newline at end of file
|
@ -15,5 +15,11 @@ import postcss from "./cfg/postcss.config.js";
|
|||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [ react(), tsconfigPaths(), dsv(),
|
plugins: [ react(), tsconfigPaths(), dsv(),
|
||||||
viteSvgr(), viteSingleFile() ],
|
viteSvgr(), viteSingleFile() ],
|
||||||
css: { postcss }
|
css: { postcss },
|
||||||
|
|
||||||
|
optimizeDeps: {
|
||||||
|
exclude: [
|
||||||
|
"react-virtualization"
|
||||||
|
]
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user