When I use Rollup to compile code for the production environment, I don't want Rollup to perform tree shaking on the Vue library, although tree shaking should be performed normally for other libraries. For example, within a component, even if I only import the ref API from Vue, I still want all members API of the Vue framework to be exported during compilation. Below are my Vue file and Vite configuration. Even when I configured global tree shaking to be false, the packaged Vue chunk still only exports the APIs related to ref. Moreover, I only want this to apply to Vue.
<template>
<div>{{ time }}</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import dayjs from 'dayjs';
const time = ref(2024);
</script>
When I use Rollup to compile code for the production environment, I don't want Rollup to perform tree shaking on the Vue library, although tree shaking should be performed normally for other libraries. For example, within a component, even if I only import the ref API from Vue, I still want all members API of the Vue framework to be exported during compilation. Below are my Vue file and Vite configuration. Even when I configured global tree shaking to be false, the packaged Vue chunk still only exports the APIs related to ref. Moreover, I only want this to apply to Vue.