cmux / koot

Koot是基于React和Koa的WEB全栈技术解决方案。
https://koot.js.org
Apache License 2.0
67 stars 13 forks source link

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

Open Diablohu opened 4 years ago

Diablohu commented 4 years ago

提供时,清理 node_modules/.cache

另外,koot-dev 的 DLL 做缓存

Diablohu commented 4 years ago

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

[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 commented 4 years ago

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

[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 commented 4 years ago

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