svelteuidev / svelteui

SvelteUI Monorepo
https://svelteui.dev
MIT License
1.31k stars 62 forks source link

About the increment of bundle size #347

Open etclub opened 1 year ago

etclub commented 1 year ago

What package has an issue

@svelteuidev/core

A clear and concise description of what the bug is

IMO, the package size matters for someone to choose a UI component library, besides its functionality. But I cannot find the information in svelteui's document. I did some tests (see below). It seems svelteui is quite big. I also want to know if there's anyway to reduce it.

In which browser(s) did the problem occur?

No response

Steps To Reproduce

I create an skeleton project of sveltekit. After running npm run build, the size of .svelte-kit is 348K. Then I add in +page.svelte

<script>
    import { Button, Paper } from '@svelteuidev/core';
    import { clickoutside } from '@svelteuidev/composables';

    let open = true;
</script>

<div use:clickoutside={{ enabled: open, callback: () => open = false }}>
    <Button on:click={() => open = true}>Open Modal</Button>
    {#if open}
        <Paper shadow='sm'>
            This is a modal, click anywhere to close
        </Paper>
    {/if}
</div>

the size of .svelte-kit becomes 620K.

And after I replace the adapter-auto with adapter-node, it becomes 960K.

Do you know how to fix the issue

No

Are you willing to participate in fixing this issue and create a pull request with the fix

No

Relevant Assets

No response

BeeMargarida commented 1 year ago

The numbers you gave, are they for the development or production build?

etclub commented 1 year ago

production build

IamSanjayGupta commented 1 year ago

Any update on this ?.

I want to use svelteUI for our project but because of beta and above such bug i can't use it now. because for my project bundle size matters alot.

can you give some deadline by when SvelteUI will be have stable version ?

BeeMargarida commented 1 year ago

This is not a priority at the moment, we are currently making a migration of our style API. I can't give a prediction of when SvelteUI will be stable.