Most likely it's one or more of the current limitations of the static analysis Vite does to handle these imports: https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations