This commit is contained in:
Michael Telatynski 2026-04-22 13:10:47 +01:00
parent a3d30b6163
commit cbcd247b77
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D
2 changed files with 1 additions and 14 deletions

View File

@ -33,8 +33,6 @@ const config: Config = {
"\\$webapp/i18n/languages.json": "<rootDir>/__mocks__/languages.json",
"^react$": "<rootDir>/../../node_modules/react",
"^react-dom$": "<rootDir>/../../node_modules/react-dom",
"^matrix-js-sdk$": "<rootDir>/../../node_modules/matrix-js-sdk/src",
"^matrix-react-sdk$": "<rootDir>/src",
"decoderWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js",
"decoderWorker\\.min\\.wasm": "<rootDir>/__mocks__/empty.js",
"waveWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js",

View File

@ -153,11 +153,6 @@ export default (env: string, argv: Record<string, any>): webpack.Configuration =
development["devtool"] = "source-map";
}
// Resolve the directories for the js-sdk for later use. We resolve these early, so we
// don't have to call them over and over. We also resolve to the package.json instead of the src
// directory, so we don't have to rely on an index.js or similar file existing.
const jsSdkSrcDir = path.join(getPackageRoot("matrix-js-sdk"), "src");
return {
...development,
@ -241,7 +236,7 @@ export default (env: string, argv: Record<string, any>): webpack.Configuration =
"react": getPackageRoot("react"),
"react-dom": getPackageRoot("react-dom"),
// Same goes for js/react-sdk - we don't need two copies.
// Same goes for js-sdk/module-api - we don't need two copies.
"matrix-js-sdk": getPackageRoot("matrix-js-sdk"),
"@matrix-org/react-sdk-module-api": getPackageRoot("@matrix-org/react-sdk-module-api"),
// and matrix-widget-api
@ -305,12 +300,6 @@ export default (env: string, argv: Record<string, any>): webpack.Configuration =
// our own source needs babel-ing
if (f.startsWith(path.resolve(__dirname, "src"))) return true;
// we use the original source files of js-sdk, so we need to
// run them through babel. Because the path tested is the resolved, absolute
// path, these could be anywhere thanks to linking. We must also not
// include node modules inside these modules, so we add 'src'.
if (f.startsWith(jsSdkSrcDir)) return true;
// Some of the syntax in this package is not understood by
// either webpack or our babel setup.
// When we do get to upgrade our current setup, this should