webpack打包报错
1 | Invalid configuration object . Webpack has been initialised using a configuration object that does not match the API schema.<br> - configuration.module has an unknown property 'loaders' . These properties are valid: object <br> { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, noParse?, rules?, defaultRules?, <br>unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, <br>wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp?, strictExportPresence?, strictThisContextOnImports? }<br> -> Options affecting the normal modules (`NormalModuleFactory`). |
解决方法:将module中的loaders替换为rules
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步