1. 程式人生 > >webpack -- 代碼分離

webpack -- 代碼分離

但是 str ash 發現 clas 報錯 tex 需要 and

一、代碼分離

這裏按照官網,配置extract-text-webpack-plugin,但是如果是webpack 4.0以上,就會報錯,需要安裝如下應用:
報錯
Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
解決

npm install [email protected] --save-dev

二、輸出文件

正常我們配置[contenthash:8]發現報錯了,所以改成[chunkhash:8]

webpack -- 代碼分離