EDITOR: Provide type definitions for React and ReactDOM in in-game editor. (#1458)

* Fix the type declaration of `!!raw-loader!` modules.

Instead of declaring them to export an object with a single key
`default` which is a string, the modules have a default export, which
is a string.

Note, that this doesn't actually change the generated code, just the
types that typescript sees. The code worked before because the only
thing done to the values was to coerce the values to a string, which
turned into a no-op.

* Switch from using `raw-loader` to using a source asset module.

`raw-loader` was deprecated in webpack v5.
This commit is contained in:
Tom Prince
2024-07-07 01:08:33 -06:00
committed by GitHub
parent 055b4bd7bc
commit b277975656
12 changed files with 95 additions and 111 deletions

View File

@@ -85,7 +85,6 @@
"monaco-editor": "^0.35.0",
"monaco-editor-webpack-plugin": "^7.1.0",
"prettier": "^2.8.8",
"raw-loader": "^4.0.2",
"react-refresh": "^0.14.0",
"rehype-mathjax": "^4.0.3",
"remark-math": "^5.1.1",