-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VJsoneditor does not work with nuxtjs #52
Comments
I resolved it following the steps here: #41 (comment) Basically add in the nuxt.config.js file at the plugins section add:
and of course add a new file named: json-editor.js in the plugins folder and place the content as below:
Thou, would be nice to have an example using nuxt js in the official page. |
Unfortunately the solution did not fully work yet, so, as soon as I did the changes due to immediate refresh of the components without having to do a full page load it works, but as soon as I did a full page load again the same problem. |
Hi, Here is my configuration to use VJsoneditor with NuxtJS : v-jsoneditor.ts : import Vue from 'vue';
import VJsoneditor from 'v-jsoneditor';
Vue.component('VJsoneditor', VJsoneditor); nuxt.config.ts : plugins: [
'~/plugins/v-jsoneditor'
], Then I can then use the component, for example : <v-jsoneditor
v-model="model"
:options="options()"
:plus="false"
height="100%"
/> I hope it helps you |
I am trying to use this package but it does not work with nuxtjs. Basically what I did is described below:
npm install v-jsoneditor --save
import VJsoneditor from 'v-jsoneditor'
....
And the I try to use the component like below:
but it throws an error as below:
ReferenceError
self is not defined
Also tried to set
fetchOnServer: false
for that component and still does not work. Also, wrapping the code with tag does not help either.Any idea how to make this work ?
Referring tot his thread josdejong/jsoneditor#1362 (comment)
seems somebody fixed this issue but not sure he changed the whole project to render on client side or just that particular component.
The text was updated successfully, but these errors were encountered: