diff --git a/src/compile/Component.ts b/src/compile/Component.ts index cce955dd8c..0bd14b0b46 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -71,7 +71,6 @@ export default class Component { hoistable_names: Set = new Set(); hoistable_nodes: Set = new Set(); node_for_declaration: Map = new Map(); - module_exports: Array<{ name: string, as: string }> = []; partly_hoisted: string[] = []; fully_hoisted: string[] = []; reactive_declarations: Array<{ assignees: Set, dependencies: Set, snippet: string }> = []; @@ -256,7 +255,10 @@ export default class Component { options.sveltePath, importedHelpers, this.imports, - this.module_exports, + this.vars.filter(variable => variable.module && variable.exported_as).map(variable => ({ + name: variable.name, + as: variable.exported_as + })), this.source ); @@ -613,12 +615,6 @@ export default class Component { this.extract_exports(script.content, true); remove_indentation(this.code, script.content); this.module_javascript = this.extract_javascript(script); - - // TODO remove this - this.module_exports = this.vars.filter(variable => variable.module && variable.exported_as).map(variable => ({ - name: variable.name, - as: variable.exported_as - })); } walk_instance_js_pre_template() {