mirror of https://github.com/sveltejs/svelte
[feat] enable export ... from (#6574)
parent
4d677d5643
commit
c550f604f2
@ -0,0 +1,5 @@
|
||||
export default {
|
||||
options: {
|
||||
accessors: true
|
||||
}
|
||||
};
|
@ -0,0 +1,34 @@
|
||||
/* generated by Svelte vX.Y.Z */
|
||||
import { SvelteComponent, init, safe_not_equal } from "svelte/internal";
|
||||
|
||||
import { f as f_1, g as g_1 } from './d';
|
||||
import { h as h_1 } from './e';
|
||||
import { i as j } from './f';
|
||||
export { d as e } from './c';
|
||||
export { c } from './b';
|
||||
export { a, b } from './a';
|
||||
|
||||
class Component extends SvelteComponent {
|
||||
constructor(options) {
|
||||
super();
|
||||
init(this, options, null, null, safe_not_equal, {});
|
||||
}
|
||||
|
||||
get f() {
|
||||
return f_1;
|
||||
}
|
||||
|
||||
get g() {
|
||||
return g_1;
|
||||
}
|
||||
|
||||
get h() {
|
||||
return h_1;
|
||||
}
|
||||
|
||||
get j() {
|
||||
return j;
|
||||
}
|
||||
}
|
||||
|
||||
export default Component;
|
@ -0,0 +1,11 @@
|
||||
<script context="module">
|
||||
export { a, b } from './a';
|
||||
export { c } from './b';
|
||||
export { d as e } from './c';
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export { f, g } from './d';
|
||||
export { h } from './e';
|
||||
export { i as j } from './f';
|
||||
</script>
|
@ -0,0 +1,6 @@
|
||||
export default {
|
||||
options: {
|
||||
accessors: true,
|
||||
format: 'cjs'
|
||||
}
|
||||
};
|
@ -0,0 +1,36 @@
|
||||
/* generated by Svelte vX.Y.Z */
|
||||
"use strict";
|
||||
|
||||
const { SvelteComponent, init, safe_not_equal } = require("svelte/internal");
|
||||
const { f: f_1, g: g_1 } = require("./d");
|
||||
const { h: h_1 } = require("./e");
|
||||
const { i: j } = require("./f");
|
||||
exports.e = require("./c").d;
|
||||
exports.c = require("./b").c;
|
||||
exports.a = require("./a").a;
|
||||
exports.b = require("./a").b;
|
||||
|
||||
class Component extends SvelteComponent {
|
||||
constructor(options) {
|
||||
super();
|
||||
init(this, options, null, null, safe_not_equal, {});
|
||||
}
|
||||
|
||||
get f() {
|
||||
return f_1;
|
||||
}
|
||||
|
||||
get g() {
|
||||
return g_1;
|
||||
}
|
||||
|
||||
get h() {
|
||||
return h_1;
|
||||
}
|
||||
|
||||
get j() {
|
||||
return j;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = Component;
|
@ -0,0 +1,11 @@
|
||||
<script context="module">
|
||||
export { a, b } from './a';
|
||||
export { c } from './b';
|
||||
export { d as e } from './c';
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export { f, g } from './d';
|
||||
export { h } from './e';
|
||||
export { i as j } from './f';
|
||||
</script>
|
@ -0,0 +1,18 @@
|
||||
/* generated by Svelte vX.Y.Z */
|
||||
import { SvelteComponent, init, safe_not_equal } from "svelte/internal";
|
||||
|
||||
import './d';
|
||||
import './e';
|
||||
import './f';
|
||||
export { d as e } from './c';
|
||||
export { c } from './b';
|
||||
export { a, b } from './a';
|
||||
|
||||
class Component extends SvelteComponent {
|
||||
constructor(options) {
|
||||
super();
|
||||
init(this, options, null, null, safe_not_equal, {});
|
||||
}
|
||||
}
|
||||
|
||||
export default Component;
|
@ -0,0 +1,11 @@
|
||||
<script context="module">
|
||||
export { a, b } from './a';
|
||||
export { c } from './b';
|
||||
export { d as e } from './c';
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export { f, g } from './d';
|
||||
export { h } from './e';
|
||||
export { i as j } from './f';
|
||||
</script>
|
@ -0,0 +1,23 @@
|
||||
<script context="module">
|
||||
export { a, b } from './B.svelte';
|
||||
export { c as d } from './B.svelte';
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export { d, e } from './B.svelte';
|
||||
export { f as g } from './B.svelte';
|
||||
let e = 123;
|
||||
let b = 234;
|
||||
function foo() {
|
||||
e = 456;
|
||||
b = 567;
|
||||
}
|
||||
</script>
|
||||
|
||||
a: {typeof a}<br />
|
||||
b: {typeof b}<br />
|
||||
c: {typeof c}<br />
|
||||
d: {typeof d}<br />
|
||||
e: {typeof e}<br />
|
||||
f: {typeof f}<br />
|
||||
g: {typeof g}<br />
|
@ -0,0 +1,8 @@
|
||||
<script context="module">
|
||||
export const a = 'a';
|
||||
export const b = 'b';
|
||||
export const c = 'c';
|
||||
export const d = 'd';
|
||||
export const e = 'e';
|
||||
export const f = 'f';
|
||||
</script>
|
@ -0,0 +1,28 @@
|
||||
export default {
|
||||
html: `
|
||||
a,b,undefined,c
|
||||
<br />
|
||||
a: undefined<br />
|
||||
b: number<br />
|
||||
c: undefined<br />
|
||||
d: undefined<br />
|
||||
e: number<br />
|
||||
f: undefined<br />
|
||||
g: undefined<br />
|
||||
<br />
|
||||
{"d":"d","e":"e","g":"f"}
|
||||
`,
|
||||
ssrHtml: `
|
||||
a,b,undefined,c
|
||||
<br />
|
||||
a: undefined<br />
|
||||
b: number<br />
|
||||
c: undefined<br />
|
||||
d: undefined<br />
|
||||
e: number<br />
|
||||
f: undefined<br />
|
||||
g: undefined<br />
|
||||
<br />
|
||||
{}
|
||||
`
|
||||
};
|
@ -0,0 +1,21 @@
|
||||
<script>
|
||||
import A, { a, b, c, d } from './A.svelte';
|
||||
import {onMount} from 'svelte';
|
||||
|
||||
let component;
|
||||
let props = {};
|
||||
onMount(() => {
|
||||
props = {
|
||||
d: component.d,
|
||||
e: component.e,
|
||||
f: component.f,
|
||||
g: component.g,
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
{a},{b},{c},{d}
|
||||
<br />
|
||||
<A bind:this={component} />
|
||||
<br />
|
||||
{JSON.stringify(props)}
|
Loading…
Reference in new issue