webpack技术使用及配置

安装方式

npm install webpack -S

基础使用方式

命令行输入 webpack 入口 出口

webpack 配置文件 webpack.config.js 基础使用方式

    const path = require("path");   // 引入node 中的 path 模块处理路径
    module.exports = {
          entry : "./src/main.js",
           output : {
            path : path.join(__dirname,"./dist"),
            filename : "bundle.js"
}
}
posted @ 2019-05-16 20:07  qwerasdzzc  阅读(79)  评论(0)    收藏  举报