Skip to content

Commit

Permalink
Use ES6 import to load vue component
Browse files Browse the repository at this point in the history
With latest latest mix require causes problem when loaded like this.
  • Loading branch information
hasan-wajahat committed Feb 9, 2022
1 parent 499bb9f commit 164f19c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"/js/field.js": "/js/field.js?id=6fb3f72c7d031abeabce"
"/js/field.js": "/js/field.js?id=91285b3fc9d7bd26b92f"
}
17 changes: 11 additions & 6 deletions resources/js/field.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Nova.booting((Vue, router, store) => {
Vue.component('unlayer-editor', require('./components/UnlayerEditor'))
Vue.component('index-nova-unlayer-field', require('./components/IndexField'))
Vue.component('detail-nova-unlayer-field', require('./components/DetailField'))
Vue.component('form-nova-unlayer-field', require('./components/FormField'))
})
import UnlayerEditor from './components/UnlayerEditor.vue';
import IndexField from './components/IndexField.vue';
import DetailField from './components/DetailField.vue';
import FormField from './components/FormField.vue';

Nova.booting((Vue) => {
Vue.component('unlayer-editor', UnlayerEditor);
Vue.component('index-nova-unlayer-field', IndexField);
Vue.component('detail-nova-unlayer-field', DetailField);
Vue.component('form-nova-unlayer-field', FormField);
});

0 comments on commit 164f19c

Please sign in to comment.