#Any rollup options to keep unused functions/variables in the bundle?

1 messages · Page 1 of 1 (latest)

cinder breach
#

First, it's my question about debugging on stackoverflow: https://stackoverflow.com/questions/75694857/rollup-how-to-preserve-keep-unused-variables
Second, I'd like to try to use Component::setupState and pick some "expected by a child component" functions defined in the parent component.
Unfortunately Rollup just purges them, I think such rude purging should be controllable.


OOPS. On the other hand, maybe Vue SFC compiler does that?
<script setup> is compiled and the setup state is returned from setup()
So the question is what module purges my unused functions/vars from <script setup>?

loud mountain
#

treeShaking is an esbuild option

#

vite defaults it to true