When "Select" is included like told from docs to be tree-shaking aware:
import Select from 'stwui/select';
tree-shaking breaks and all complete STWUI library is included, according to output JS size and rollup-plugin-visualizer stats.
Expected Behavior
When "Select" is included like told from docs to be tree-shaking aware:
import Select from 'stwui/select';
tree-shaking must be performed well and only neccessary components shall be included, not all STWUI library code.
Steps To Reproduce
Create any project from empty template, include "Select" this way:
import Button from 'stwui/button';
Build, check the size and dependencies using rollup-plugin-visualizer (only Button code and some helper code of couse will be included)
import Select from 'stwui/select';
Build, check the size and dependencies using rollup-plugin-visualizer (all STWUI code will be included, this is erroneous behavior)
Link to Reproduction / Stackblitz
No response
More Information
I've checked and found that problem resides in Select.svelte component code. At now, Icon is included like this:
import { Icon } from '../../'; (at line 5) and this includes complete STWUI in result
must be fixed to include it like this:
import Icon from '../icon';
I will prepare a pull request.
Current Behavior
When "Select" is included like told from docs to be tree-shaking aware:
import Select from 'stwui/select';
tree-shaking breaks and all complete STWUI library is included, according to output JS size and rollup-plugin-visualizer stats.Expected Behavior
When "Select" is included like told from docs to be tree-shaking aware:
import Select from 'stwui/select';
tree-shaking must be performed well and only neccessary components shall be included, not all STWUI library code.Steps To Reproduce
import Button from 'stwui/button';
import Select from 'stwui/select';
Link to Reproduction / Stackblitz
No response
More Information
I've checked and found that problem resides in Select.svelte component code. At now, Icon is included like this:
import { Icon } from '../../';
(at line 5) and this includes complete STWUI in result must be fixed to include it like this:import Icon from '../icon';
I will prepare a pull request.