1、Validate config "cssLoader" failed, "getLocalIdent" is not allowed
ValidationError: "getLocalIdent" is not allowed
原配置
cssLoaderOptions: {
modules: true,
getLocalIdent: (
context: {
resourcePath: string;
},
_: string,
localName: string,
) => {
},
},
修改后配置
cssLoader: {
modules: {
localIdentName: '[path][name]__[local]--[hash:base64:5]',
getLocalIdent: (
context: {
resourcePath: string;
},
_: string,
localName: string,
) => {
},
},
},
2、
关闭了umi3的mfsu功能,mfsu找不到相应的模块
3
4、umi3的mfsu功能,不兼容webpack-theme-color-replacer
暂时注释了webpack-theme-color-replacer
5、umi升级后使用方式改变了
6
增加配置:devtool: isAntDesignProPreview ? 'source-map' : false,
7[MFSU] require('lodash/isEqual')found in E:\BJHK\Project\My\webapp\src\components\UserTransfer\index.js, which will broken the MFSU prebuild match, please change to esm module import.
8
dva 中找不到 对应的命名空间,在对应的modal文件添加唯一的命名空间
9
//登录成功后跳转到首页
history.push(homepage)
//dispatch用法错误
//this.props.dispatch(history.push(homepage));
10、其他一些dva问题
11、找不到对应的依赖包
找不到对应的react-sortalejs包,在配置中添加
extraBabelIncludes:['react-sortablejs'],
12 、npm报的错,无法解析相关的依赖
需要对npm先降级一下,后升级试一试,npm实在不行就用
npm install npm@6.4.1 -g 降级到指定版本
npm install -g npm 升级最新版本
npm cache clean -f npm清除缓存
13
14、
需要删除node_modules , 使用yarn 方式重新拉依赖,不然会存在某些依赖包会有缓存
15、找不到全局的localforage
<script src="./jsLib/localforage.js"></script>
<script>
if (window.localforage) {
localforage.config({
name: 'nky',
storeName: 'global',
version: 1.0,
});
</script>