Merge pull request #2172 from jches/gh/2165

Fix code generation for non-exported vars after an export
pull/2188/head
Rich Harris 6 years ago committed by GitHub
commit 4090925a8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -839,6 +839,13 @@ export default class Component {
current_group.declarators.push(declarator); current_group.declarators.push(declarator);
} }
if (next) {
const next_variable = component.var_lookup.get(next.id.name)
if (next_variable && !next_variable.export_name) {
code.overwrite(declarator.end, next.start, ` ${node.kind} `);
}
}
} else { } else {
current_group = null; current_group = null;

@ -0,0 +1,9 @@
export default {
props: {
a: 42
},
html: `
42
`
}

@ -0,0 +1,7 @@
<script>
let a, b, c, d;
export { a, c }
</script>
{a}
Loading…
Cancel
Save