1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Fix that whole export debacle (#1370)

* Re-add setting exports

* Update webpack.production.config.js

* Update mod.js

* Slight change

* Update mod.js

* Update webpack.production.config.js

* Update webpack.config.js
This commit is contained in:
Bagel03
2022-02-13 15:09:41 -05:00
committed by GitHub
parent dab4aa9cda
commit f534a88f80
4 changed files with 49 additions and 4 deletions

View File

@@ -112,7 +112,8 @@ export class ModLoader {
// @ts-ignore
const module = modules(key);
for (const member in module) {
if (member === "default") {
if (member === "default" || member === "__$S__") {
// Setter
continue;
}
if (exports[member]) {
@@ -124,7 +125,7 @@ export class ModLoader {
return module[member];
},
set(v) {
throw new Error("Overriding the shapez exports is currently not possible");
module.__$S__(member, v);
},
});
}