I'm trying to make a cropped image and then upload it to amazon in my NuxtJs
app. The problem comes when I import library vue-image-crop-upload
and get unexpected token <. Or briefly Syntax error
I tried using no-ssr
but looks like a problem inside actual module.
// Usage in component
<no-ssr>
<button class="btn btn-primary upload-picture" @click="toggleShow">Cargar imagen</button>
<avatar-upload field="img"
@crop-success="cropSuccess"
v-model="show"
:no-square="true"
:width="500"
lang-type="en"
:height="500"
:params="params"
:headers="headers"
img-format="png"></avatar-upload>
<img :src="imgDataUrl">
</no-ssr>
import VueImageCropUpload from 'vue-image-crop-upload';
// Plugin registered
import Vue from 'vue';
import myUpload from 'vue-image-crop-upload';
Vue.component('avatar', myUpload);
// nuxt.config.js
plugins: [
{src: 'plugins/VueCropper', ssr: false},],
vendor: ['jquery', 'bootstrap', 'vue-image-crop-upload'],
I expect it working on nuxt.js. Client rendered app on which i tried to do the same works perfect