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.

Module build<br />

As we saw earlier, <strong>Vue</strong> can be dropped into a project as an external script for<br />

direct use in a browser. <strong>Vue</strong> is also available as an NPM module for use in more<br />

sophisticated projects, including a build tool such as Webpack.<br />

If you're unfamiliar with Webpack, it's a module bundler that takes all your<br />

project assets <strong>and</strong> bundles them up into something you can provide to the<br />

browser. In the bundling process, you can transform those assets as well.<br />

Using <strong>Vue</strong> as a module <strong>and</strong> introducing Webpack opens possibilities such as the<br />

following:<br />

Single-file components<br />

ES feature proposals not currently supported in browsers<br />

Modularized code<br />

Pre-processors such as SASS <strong>and</strong> Pug<br />

We will be exploring Webpack more extensively in Chapter 5,<br />

Integrating <strong>Laravel</strong> <strong>and</strong> <strong>Vue</strong>.<strong>js</strong> with Webpack.

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

Saved successfully!

Ooh no, something went wrong!