From 8627c949bfad0683d372a17b4eafdae1bd6d5464 Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Mon, 19 Aug 2024 14:33:42 +0200 Subject: [PATCH] [Wasm] Remove default exports from main mjs file in Wasm ^KT-65799 fixed --- .../org/jetbrains/kotlin/backend/wasm/wasmCompiler.kt | 9 --------- 1 file changed, 9 deletions(-) diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/wasmCompiler.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/wasmCompiler.kt index 3c01415543f4a..ed9eb1e2264c0 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/wasmCompiler.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/wasmCompiler.kt @@ -459,15 +459,6 @@ fun WasmCompiledModuleFragment.generateExports(): String { /*language=js */ return """ -export default new Proxy(exports, { - _shownError: false, - get(target, prop) { - if (!this._shownError) { - this._shownError = true; - throw new Error("Do not use default import. Use the corresponding named import instead.") - } - } -}); ${exportNames?.let { "export $it = exports;" }} """ }