Closed as not planned
Closed as not planned
Description
Describe the bug
After updating to rollup 4.27 some of the icons inside my project stopped working. After some searching the problem seems to be related to the vanishing icons only being used inside #await then
blocks. Downgrading to rollup 4.26 or including the icons anywhere outside of an #await then
fixes the issue.
The issue only occurs when building the project, icons work fine when running npm run dev
. I am using the static adapter.
Reproduction
https://git.plabble.org/Job79/Svelte-tree-shake-issue
<script lang="ts">
import Fa from "svelte-fa";
import {
faMinusCircle,
faPlusCircle,
} from "@fortawesome/free-solid-svg-icons";
const wait = (milliseconds: number) =>
new Promise((resolve) => setTimeout(resolve, milliseconds));
</script>
<div>
{#await wait(100) then}
<div>
Icon1: <Fa icon={faPlusCircle} />
</div>
<div>
Icon1 isn't shown when building with rollup >= 4.27. It does get shown
when placed outside the await or when included anywhere else.
</div>
{/await}
<div>
Icon2: <Fa icon={faMinusCircle} />
</div>
<div>No problems when showing icons outside of an #await</div>
</div>
Logs
No response
System Info
System:
OS: Linux 5.15 Fedora Linux 41 (Container Image)
Container: Yes
Shell: 5.2.32 - /bin/bash
Binaries:
Node: 22.11.0 - /usr/bin/node
npm: 10.9.0 - /usr/bin/npm
Severity
blocking an upgrade
Metadata
Metadata
Assignees
Labels
No labels