Closed DaleMatthews closed 5 years ago
Import vue.esm.js
instead of vue.runtime.esm.js
.
I'm not importing vue at all.
// enhanceApp.js as defined by vuepress
import VueCarousel from '@chenfengyuan/vue-carousel';
export default ({
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData // site metadata
}) => {
Vue.component(VueCarousel.name, VueCarousel);
}
I haven't had these issues with other components
This component requires vue-template-compiler
for compiling custom slide content as HTML.
You should install vue-template-compiler
and import vue.esm.js
in your vuepress config file.
I was encountering the same issue, but this doesn't happen whenever the production build is done so.. just you can ignore the warning. Thanks for the carousel component.
@fengyuanchen Could you post a minimal working example for adding this to Vuepress?
@kjimenezdev could you share the vuepress component?
@taozuhong Please note that:
@chenfengyuan/vue-carousel@1.x
for Vue 2 and Vuepress 1.@chenfengyuan/vue-carousel@2.x
for Vue 3 and Vuepress 2.收到,谢谢分享。 Got it, thanks.
Trying to use this component in vuepress and I am getting this error
I installed the package using npm as instructed, then tried 1) registering the component globally in enhanceApp.js 2) or importing it directly into my about-me component and registering it there
I assume the issue has to do with how you're building to your dist dir. I see some potentially useful info here: https://github.com/vuejs-templates/webpack/issues/215