webpack 构建 node_modules 中公司内部组件

构建 node_modules 中特定的组件

       {
        test:/\.js$/,
        exclude: /node_modules\/(?!(zt-)\/).*/,
        use:[
          {
            loader:"babel-loader",
            options:{presets:["env"]}
          }
        ]
      },

zt- 开头的组件排除在外,就会去对 zt- 开头的组件进行编译

多个处理方式

posted on 2018-08-07 10:42  松鼠闹IT  阅读(464)  评论(0编辑  收藏  举报

导航