webpack 打包編譯-webkit-box-orient: vertical 後消失

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

打包時必須使用這種方法打包,不然打包後  -webkit-box-orient: vertical 便會消失css

網上解決方案是這樣的,可是我在個人項目中發現不起做用,android

解決方案webpack

optimize-css-assets-webpack-plugin這個插件的問題git

註釋掉webpack.prod.conf.js中下面的代碼github

 


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

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

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

相關文章
相關標籤/搜索