External component (vue-ssr-carousel) doesn't work in Vite (vue2)/rollup production SSR build - render function or template not defined in component: carousel

This issue has been tracked since 2022-09-02.

Version

2.7.10

Reproduction link

github.com

Steps to reproduce

Clone the reproduction repo and follow the steps from the repo readme to run the SSR build and repro the issue

What is expected?

The component works the same in the dev (vite) build and the production (rollup) build during SSR

What is actually happening?

The dev build SSR works fine, but the production SSR build fails with render function or template not defined in component: carousel


I created an issue in the repo for the external component, but upon further reflection I think this might be a more general vue (or maybe rollup?) issue.
BKWLD/vue-ssr-carousel#89

I tried asking on discord in the #vue-2 channel, but no one replied unfortunately.

SecretPocketCat wrote this answer on 2022-09-10

This work fine with webpack
https://github.com/SecretPocketCat/vue2-ssr-carousel-render-fn-not-defined-repro/tree/webpack-vuecli

So I'm not sure whether this issue stems from the lib, vite, vue2 vite plugin or rollup.

More Details About Repo
Owner Name vuejs
Repo Name vue
Full Name vuejs/vue
Language TypeScript
Created Date 2013-07-29
Updated Date 2022-10-03
Star Count 199758
Watcher Count 6095
Fork Count 32874
Issue Count 590

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date