用mini-css-extract-plugin、postcss-loader、less打包失败
- webpack 5.37.1
- mini-css-extract-plugin 1.6.0
- postcss-loader 5.3.0
- less 4.1.1
ERROR in ./src/views/app.vue?vue&type=style&index=0&lang=less& (./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-7[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-7[0].rules[0].use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-7[0].rules[0].use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/views/app.vue?vue&type=style&index=0&lang=less&)
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
TypeError: node.getIterator is not a function
at LazyResult.visitTick (E:\looveepay\01.CI\1.7 Code\Web\1.7.3 Trunk\looveepay_merchant\node_modules\postcss\lib\lazy-result.js:522:33)
at LazyResult.runAsync (E:\looveepay\01.CI\1.7 Code\Web\1.7.3 Trunk\looveepay_merchant\node_modules\postcss\lib\lazy-result.js:402:30)
at async Object.loader (E:\looveepay\01.CI\1.7 Code\Web\1.7.3 Trunk\looveepay_merchant\node_modules\postcss-loader\dist\index.js:87:14)
at processResult (E:\looveepay\01.CI\1.7 Code\Web\1.7.3 Trunk\looveepay_merchant\node_modules\webpack\lib\NormalModule.js:700:19)
at E:\looveepay\01.CI\1.7 Code\Web\1.7.3 Trunk\looveepay_merchant\node_modules\webpack\lib\NormalModule.js:806:5
at E:\looveepay\01.CI\1.7 Code\Web\1.7.3 Trunk\looveepay_merchant\node_modules\loader-runner\lib\LoaderRunner.js:399:11
at E:\looveepay\01.CI\1.7 Code\Web\1.7.3 Trunk\looveepay_merchant\node_modules\loader-runner\lib\LoaderRunner.js:251:18
at context.callback (E:\looveepay\01.CI\1.7 Code\Web\1.7.3 Trunk\looveepay_merchant\node_modules\loader-runner\lib\LoaderRunner.js:124:13)
at Object.loader (E:\looveepay\01.CI\1.7 Code\Web\1.7.3 Trunk\looveepay_merchant\node_modules\postcss-loader\dist\index.js:96:7)
@ ./src/views/app.vue?vue&type=style&index=0&lang=less& 1:0-482 1:0-482
@ ./src/views/app.vue 4:0-64
@ ./src/main.js 7:0-32 28:13-20
只要我不加postcss-loader,就可以打包成功。所以应该是postcss-loader的问题?还是mini-css-extract-plugin的问题?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论