Incorporating VueJS into my current project has been a bit challenging. When I attempted to register a new component and use it within
<component></component>
, I encountered a runtime error. However, after some troubleshooting, I discovered that rendering components as shown below resolves the issue:
import App from './components/Example.vue'
new Vue({
el: '#app',
render: h => h(App)
})
While this method successfully renders my component, I'm curious if there is an alternative approach to component registration that I could explore.
I've come across suggestions about adding a script in webpack but I'm uncertain about where precisely to implement this within my code setup for real-time updates:
watchify src/app.js -t vueify -t babelify -p browserify-hmr -p [ vueify/plugins/extract-css -o public/styles.bundle.css ] -o public/app.bundle.js