As the title says it all, I will still guide you to reproduce the issue. Details are below.
Steps to reproduce
- Clone Laravel official project from Github
- Install all dependencies of Php and JavaScript (Node)
npm install- for nodecomposer install- for php
After installing all dependencies
Open up
resources/views/welcome.blade.phpand edit it to the following code below<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Mix</title> <link rel="stylesheet" href="{{ mix('css/app.css') }}"> </head> <body> <div id="app"> <h1>Hello, world!</h1> <example-component /> <camel-case-component /> </div> <script src="{{ mix('js/app.js') }}"></script> </body> </html>Open up
resources/js/app.jsand edit it to the following code belowrequire('./bootstrap'); window.Vue = require('vue'); Vue.component('camel-case-component', require('./components/CamelCaseComponent.vue').default); Vue.component('example-component', require('./components/ExampleComponent.vue').default); const app = new Vue({ el: '#app' });Note: Do not forget to add the file
resources/js/components/CamelCaseComponent.vueRun the laravel mix,
npm run dev- Serve your app,
php artisan serveand open it using any browserhttp://127.0.0.1:8000/
That's it. Minimal modification only.