i want render Vue.js Code but NOT WORKING IN LARAVEL 5.7
My app.js Code :
require('./bootstrap');
window.Vue = require('vue');
Vue.component('hello-world-component', require('./components/HelloWorld.vue'));
const app = new Vue({
el: '#app'
});
And New File HelloWorld.vue :
<template>
<div class="container">
Hello Laravel + Vue!
</div>
</template>
<script>
export default {
mounted() {
console.log('Component mounted.')
}
}
</script>
And welcome.blade.php :
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>Laravel</title>
</head>
<body>
<div class="content">
<div class="title m-b-md">
<hello-world-component></hello-world-component>
</div>
</div>
</body>
</html>
when i run this command,
sudo npm run dev
result :
DONE Compiled successfully in 6224ms 7:16:51 AM
Asset Size Chunks Chunk Names
/js/app.js 1.38 MB 0 [emitted] [big] /js/app
/css/app.css 198 kB 0 [emitted] /js/app
but when i connect my index page, not showing my HelloWorld.Vue code.
i have no idea what is problem?