webpack mini-css-extract-plugin ReferenceError: window is not defined

webpack打包的时候配置 了mini-css-extract-plugin插件后报错

ERROR in ./node_modules/bootstrap/dist/css/bootstrap.css

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):

ReferenceError: window is not defined

解决办法:

将style-loader 注释掉  ;mini-css-extract-plugin插件与style-loader冲突了.

Tags 建站 css

留言(0)

评论