How to use with NUXT?
See original GitHub issueTrying to figure out how to use this with NUXT. The default vue setup will not work because it does not support server side rendering. I would expect to be able to call this via a plugin and have tried a few different ways such as below:
Created a new plugin FullCalendarVue.js:
import Vue from 'vue';
import FullCalendar from '@fullcalendar/vue'
import dayGridPlugin from '@fullcalendar/daygrid'
// Vue.use(FullCalendar);
Vue.component('FullCalendar', FullCalendar);
// Vue.component('dayGridPlugin', dayGridPlugin);
Vue.use(dayGridPlugin);
Added the plugin to nuxt.config.js:
plugins: [
{mode: 'client', src: '~/plugins/FullCalendarVue'},
],
On the vue page I wrap the calendar component in no-ssr tags:
<no-ssr>
<FullCalendar
defaultView="dayGridMonth"
:plugins="calendarPlugins"
/>
</no-ssr>
This seems to load the fullcalendar plugin but I keep getting errors that “dayGridPlugin is not defined”. Any suggestions on how to setup?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:17
Top Results From Across the Web
Nuxt - The Intuitive Vue Framework
Build your next Vue.js application with confidence using Nuxt. An open source framework making web development simple and powerful.
Read more >Free Nuxt.js Tutorial — Vue Mastery Course - Medium
In this Nuxt tutorial, a free lesson from the Vue Mastery course, we'll build an application together and learn about the folder structure ......
Read more >Getting Started With Nuxt - Smashing Magazine
“Nuxt is a progressive framework based on Vue.js to create modern web applications. It is based on Vue.js official libraries (vue, vue-router ...
Read more >What is Nuxt.js? - Vue School
Nuxt.js is a framework for creating Vue.js applications. Its goal is to help Vue developers take advantage of top-notch technologies, fast, easy and...
Read more >What Is Nuxt.js? Learn More About the Intuitive Vue Framework
Nuxt.js works the same way a server-side framework works when a user visits a website. If server-side rendering is enabled, the requests are ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@RMFogarty @nucle
Hope this helps you, this is how I got it working with nuxt:
components/Calendar.vue
and contains the following (copied from the full calendar documentation)plugins/full-calendar.js
I have the followingnuxt.config.js
has the followingThe above works for me in universal mode. Defining a base component is what full calendar recommend in the docs so I’ve done that, and
ssr: false
seems to be the key to avoid Element is not defined errors@chrno1209 you can implement