koot icon indicating copy to clipboard operation
koot copied to clipboard

koot-build 和 koot-dev 添加 --no-cache 命令参数

Open Diablohu opened this issue 4 years ago • 3 comments

提供时,清理 node_modules/.cache

另外,koot-dev 的 DLL 做缓存

  • DLL 文件名 -> .dll.[dm5].js
  • md5 为 DLL 所有包名和版本号的综合

Diablohu avatar Apr 16 '20 04:04 Diablohu

如果遇到缓存相关错误,自动清理

[hardsource:3691968a] Cache is corrupted.
RangeError [ERR_INVALID_OPT_VALUE]: The value "2147483648" is invalid for option "size"
    at Function.allocUnsafe (buffer.js:366:3)
    at alloc (C:\Projects\_cheetah-mobile\health_web\node_modules\hard-source-webpack-plugin\lib\SerializerAppend2.js:46:17)
    at Append2._readFile (C:\Projects\_cheetah-mobile\health_web\node_modules\hard-source-webpack-plugin\lib\SerializerAppend2.js:160:14)
    at async C:\Projects\_cheetah-mobile\health_web\node_modules\hard-source-webpack-plugin\lib\SerializerAppend2.js:194:40
    at async Promise.all (index 0)
[hardsource:3691968a] Could not freeze ./node_modules/@ant-design/icons/es/icons/index.js: Cannot read property 'hash' of undefined

Diablohu avatar May 06 '20 06:05 Diablohu

如果遇到缓存相关错误,自动清理

[hardsource:3691968a] Cache is corrupted.
RangeError [ERR_INVALID_OPT_VALUE]: The value "2147483648" is invalid for option "size"
    at Function.allocUnsafe (buffer.js:366:3)
    at alloc (C:\Projects\_cheetah-mobile\health_web\node_modules\hard-source-webpack-plugin\lib\SerializerAppend2.js:46:17)
    at Append2._readFile (C:\Projects\_cheetah-mobile\health_web\node_modules\hard-source-webpack-plugin\lib\SerializerAppend2.js:160:14)
    at async C:\Projects\_cheetah-mobile\health_web\node_modules\hard-source-webpack-plugin\lib\SerializerAppend2.js:194:40
    at async Promise.all (index 0)
[hardsource:3691968a] Could not freeze ./node_modules/@ant-design/icons/es/icons/index.js: Cannot read property 'hash' of undefined

改为使用 hard-source-webpack-plugin-fixed-hashbug

Diablohu avatar May 11 '20 13:05 Diablohu

继续更改,使用 @diablohu/hard-source-webpack-plugin

Diablohu avatar May 12 '20 14:05 Diablohu