I recently got it working with Nuxt using the following mounted() call for a specific route (/blog/_slug):
mounted() {
if (this.slug === 'preview') {
let $this = this;
if (process.client) window.addEventListener('message', function(event) {
$this.post = event.data.entry;
}, false);
}
}
I tried working with the Nuxt previewMode but this will only try to load new data via the asyncData() hook which in return should call your API so this won’t work with Cockpits Content Preview.