Laravelでphp artisan ui vue
をするとVue.jsのscaffold(「スカフォールド」とか「スキャフォールド」とか言って、ひな形を意味するらしい)を生成できるのだが...
Vue.component(
'example-component',
require('./components/ExampleComponent.vue').default
);
これは違和感を感じないか??
ExampleComponent.vue側でmodule.exports
して、
Vue.component(
'example-component',
require('./components/ExampleComponent.vue')
);
とするか、
import ExampleComponent from './components/ExampleComponent';
Vue.component('example-component', ExampleComponent);
としたくない?
Laravel公式にも堂々と.default
って書いてるし、敢えてなのか?