2

So i started using Vue2 but i dont get the Part with cpmponents using external .vue files.
They always say : use webpack.. Well i Do use The vue basic webpack template but i dont get how to add a cpmponent which loads a external .vue File

Some links? :)

Comments
  • 1
    You probably need to use the vue-loader webpack plugin and maybe even babel if you want to use the es6 import syntax to import components into the scope of other components. You can use plain old require('somefolder/somecomponent.vue') im prettysure without babel though.

    Sorry i dont have an example off hand.
  • 1
    Use gulp and browsify/vueify. There are a few tutorials on it. Shouldn't take more than 5mins to setup
  • 1
    Try to clone https://github.com/marceloch2/...

    npm install
    webpack-dev-server

    And see if the AnotherComponent.vue is what you want. One component including others!?
  • 0
    Thanks guys i got it working :)
Add Comment