webpack 打包编译-webkit-box-orient: vertical 后消失

/* autoprefixer: off */
  -webkit-box-orient: vertical; // 参考 https://github.com/postcss/autoprefixer/issues/776
  /* autoprefixer: on */

打包时必须使用这种方法打包,否则打包后  -webkit-box-orient: vertical 便会消失

网上解决方案是这样的,但是我在我的项目中发现不起作用,

解决方案

optimize-css-assets-webpack-plugin这个插件的问题

注释掉webpack.prod.conf.js中下面的代码

 
new OptimizeCSSPlugin({
  cssProcessorOptions: config.build.productionSourceMap
    ? { safe: true, map: { inline: false } }
    : { safe: true }
}),

参考    https://github.com/ben-eb/cssnano/issues/357

    https://www.jianshu.com/p/13a30596b76c?from=androidqq

 
 
 
posted @ 2018-03-08 10:39  年轻的资本!  阅读(4166)  评论(4编辑  收藏  举报