Skip to content

Components allow const/class/function exports to be overridden #2236

@Rich-Harris

Description

@Rich-Harris

REPL. This code...

<script>
	export let a = 1;
	export const b = 2;
</script>

...results in this:

let { a = 1 } = $$props;
const { b = 2 } = $$props;

That's wrong — it should be this instead:

let { a = 1 } = $$props;
const b = 2;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions