解決 extract-text-webpack-plugin 分離 css 報錯的問題

編譯出現:css

\color{red}{Tapable.plugin\ is\ deprecated.\ Use\ new\ API\ on\ `.hooks`\ instead}


是由於安裝的 extract-text-webpack-plugin 的版本不支持 webpack4.0+webpack


換成: npm install --save-dev extract-text-webpack-plugin@nextweb


出現以下問題時:npm

\color{red}{Path\ variable\ [contenthash]\ not\ implemented\ in\ this\ context:\ [name].[contenthash].css}

Path variable [contenthash] not implemented in this context: [name].[contenthash].css

能夠將 [contenthash] 改爲 [hash],就能夠了this


[隨手筆記,感謝閱讀,不對之處請指教,謝謝]cdn

相關文章
相關標籤/搜索