Closed ipearx closed 3 years ago
// ./App.vue
<template>
<h1> My App </h1>
</template>
// ./app.js
import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App)
app.mount('#app')
You're a legend, thanks!
I managed to get My App rendered. And then added the component to App.vue, and it worked. For anyone else wondering what it looks like:
require('./bootstrap');
import { createApp } from 'vue'
import App from './components/App.vue'
const app = createApp(App)
app.component('helloworld', require('./components/HelloWorld.vue').default);
app.mount('#app')
I've been struggling to figure out how to actually use Vue 3 in Laravel 8 using this plugin.
What I've done:
My package.json looks like this:
My webpack.mix.js looks like this:
My app.js file looks like this:
My welcome.blade looks like:
It successfully compiles, but gives the error in the browser console:
I also get a browser warning:
I think I want tree shaking, but no idea how/where to configure it.
A bit more of an example in the docs would be very helpful for an amateur like myself? Any help appreciated.