css - 角度项目中的 mini-extract-css-plugin 问题
问题描述
我正在尝试从 webpack 迁移到 angular-cli,并且在构建项目时,我遇到了以下错误。
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
TypeError: Cannot read property 'replace' of undefined
at normalizeBackSlashDirection (/home/User1/GIT/project1/node_modules/webpack/lib/RequestShortener.js:16:17)
at new RequestShortener (/home/User1/GIT/project1/node_modules/webpack/lib/RequestShortener.js:26:15)
at new Compiler (/home/User1/GIT/project1/node_modules/webpack/lib/Compiler.js:195:27)
at Compiler.createChildCompiler (/home/User1/GIT/project1/node_modules/webpack/lib/Compiler.js:558:25)
at Compilation.createChildCompiler (/home/User1/GIT/project1/node_modules/webpack/lib/Compilation.js:2243:24)
at Object.pitch (/home/User1/GIT/project1/node_modules/mini-css-extract-plugin/dist/loader.js:66:43)
我没有使用自定义 webpack,所以它在内部使用,因为依赖@angular-devkit/build-angular
这里可能是什么问题?
解决方案
推荐阅读
- python - 如何在 Pandas 中转换 DateTime 和 Time 的列 dtypes
- python - 从python中的文件添加列值
- python - Pandas:将列分组为时间序列
- javascript - 在日期选择器中选择日期
- html - 如何消除图像和描述 div 之间的差距
- uber-api - 优步吃深层链接?
- node.js - 构建 api 并将编译文件发送到客户端时使用的最佳实践
- android - 请求的权限与应用的核心功能不匹配 (READ_CALL_LOG)
- python - Python - API Godaddy 问题(响应 [422])
- python - 从 AI 笔记本访问 GCP Cloud SQL?