25.06.2018 Views

Full-Stack Vue.js 2 and Laravel 5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Transformation<br />

To use a single-file component in your app, you simply import it like it were an<br />

ES module. The .vue file is not a valid JavaScript module file, however. Just like<br />

we use the Webpack Babel plugin to transpile our ES2015 code into ES5 code,<br />

we must use <strong>Vue</strong> Loader to transform .vue files into JavaScript modules.<br />

<strong>Vue</strong> Loader is already configured by default with <strong>Laravel</strong> Mix, so there's nothing<br />

further we need to do in this project; any SFCs we import will just work!<br />

To learn more about <strong>Vue</strong> Loader, check out the documentation at ht<br />

tps://vue-loader.vue<strong>js</strong>.org/.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!