官术网_书友最值得收藏!

Module build

As we saw earlier, Vue can be dropped into a project as an external script for direct use in a browser. Vue is also available as an NPM module for use in more sophisticated projects, including a build tool such as Webpack.

If you're unfamiliar with Webpack, it's a module bundler that takes all your project assets and bundles them up into something you can provide to the browser. In the bundling process, you can transform those assets as well.

Using Vue as a module and introducing Webpack opens possibilities such as the following:

  • Single-file components
  • ES feature proposals not currently supported in browsers
  • Modularized code
  • Pre-processors such as SASS and Pug

We will be exploring Webpack more extensively in Chapter 5,Integrating Laravel and Vue.js with Webpack.

主站蜘蛛池模板: 广河县| 浦城县| 黄梅县| 克东县| 明溪县| 临城县| 涞水县| 益阳市| 东阿县| 长兴县| 中宁县| 武城县| 敦化市| 托克逊县| 昂仁县| 宝清县| 文登市| 甘谷县| 敖汉旗| 南召县| 丘北县| 哈尔滨市| 徐水县| 九台市| 来凤县| 柳江县| 建水县| 仲巴县| 师宗县| 青铜峡市| 六盘水市| 永川市| 安宁市| 乐业县| 确山县| 奉新县| 集安市| 南雄市| 泰安市| 桐乡市| 逊克县|