mirror of https://github.com/sveltejs/svelte
fix: disallow `export { foo as default }` in `<script module>` (#16447)
* fix: disallow `export { foo as default }` in `<script module>` * add test * fix testpull/16445/head
parent
27c90dfa83
commit
63cbe2108a
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: disallow `export { foo as default }` in `<script module>`
|
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "module_illegal_default_export",
|
||||
"message": "A component cannot have a default export",
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 32
|
||||
}
|
||||
}
|
||||
]
|
@ -0,0 +1,4 @@
|
||||
<script module>
|
||||
let answer = 42;
|
||||
export { answer as default};
|
||||
</script>
|
Loading…
Reference in new issue