Skip to content

Commit 164f19c

Browse files
committed
Use ES6 import to load vue component
With latest latest mix require causes problem when loaded like this.
1 parent 499bb9f commit 164f19c

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

dist/js/field.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"/js/field.js": "/js/field.js?id=6fb3f72c7d031abeabce"
2+
"/js/field.js": "/js/field.js?id=91285b3fc9d7bd26b92f"
33
}

resources/js/field.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
Nova.booting((Vue, router, store) => {
2-
Vue.component('unlayer-editor', require('./components/UnlayerEditor'))
3-
Vue.component('index-nova-unlayer-field', require('./components/IndexField'))
4-
Vue.component('detail-nova-unlayer-field', require('./components/DetailField'))
5-
Vue.component('form-nova-unlayer-field', require('./components/FormField'))
6-
})
1+
import UnlayerEditor from './components/UnlayerEditor.vue';
2+
import IndexField from './components/IndexField.vue';
3+
import DetailField from './components/DetailField.vue';
4+
import FormField from './components/FormField.vue';
5+
6+
Nova.booting((Vue) => {
7+
Vue.component('unlayer-editor', UnlayerEditor);
8+
Vue.component('index-nova-unlayer-field', IndexField);
9+
Vue.component('detail-nova-unlayer-field', DetailField);
10+
Vue.component('form-nova-unlayer-field', FormField);
11+
});

0 commit comments

Comments
 (0)