fix: maintain imports in modules (#12704)

* fix: maintain imports in modules

* chore: add snapshot test
pull/12707/head
Paolo Ricciuti 3 months ago committed by GitHub
parent 31659508b0
commit 70197fe4ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -9,7 +9,8 @@ import * as b from '../../../../utils/builders.js';
export function ImportDeclaration(node, context) {
if ('hoisted' in context.state) {
context.state.hoisted.push(node);
return b.empty;
}
return b.empty;
context.next();
}

@ -0,0 +1,7 @@
import "svelte/internal/disclose-version";
import * as $ from "svelte/internal/client";
import { random } from './module.svelte';
export default function Imports_in_modules($$anchor) {
}

@ -0,0 +1,5 @@
/* module.svelte.js generated by Svelte VERSION */
import * as $ from "svelte/internal/client";
import { random } from './export';
export { random };

@ -0,0 +1,6 @@
import * as $ from "svelte/internal/server";
import { random } from './module.svelte';
export default function Imports_in_modules($$payload) {
}

@ -0,0 +1,5 @@
/* module.svelte.js generated by Svelte VERSION */
import * as $ from "svelte/internal/server";
import { random } from './export';
export { random };

@ -0,0 +1,3 @@
<script>
import { random } from './module.svelte';
</script>

@ -0,0 +1,3 @@
import { random } from './export';
export { random };
Loading…
Cancel
Save