美文网首页
webpack 小知识 持续记录

webpack 小知识 持续记录

作者: coolheadedY | 来源:发表于2017-03-24 11:27 被阅读15次

    在babel下的调试

    关键点:webpack.dev.conf.js文件 devtool选项设置成'#source-map', 这样就可以在chrome的source里打断点了
    devtool有7个配置

    修改 assetsPublicPath

    resumer/config/index.js

    webpack配置局域网ip

    然后在项目根目录中找到config进入打开index.js,配置下面代码

      devServer: {
        historyApiFallbak: true,
        hot: true,
        host: "192.168.x.xx",   //填写你自己的IP地址
        port: 8080,   //填写刚刚在dev字段中找到的port端口号
        inline: true,
        progress: true
      }
    

    相关文章

      网友评论

          本文标题:webpack 小知识 持续记录

          本文链接:https://www.haomeiwen.com/subject/esoxottx.html