webpack和vue-loader
webpack是什么?
它是一个流行的打包构建工具。目前有很多好用的插件来实现js、css的合并压缩等处理。
vue-loader是什么?
- 安装方法
cnpm install vue-loader
- 用途
主要用来编译打包.vue文件。下面是一个简单的.vue文件<style> h2{ color: red; } </style> <template> <h2>hello, </h2> </template> <script> // 构造弹窗组件 module.exports = { data: function(){ return { name: "Sally" }; } }; </script>