Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Diablohu opened this issue Apr 16, 2020 · 3 comments
Open

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

Diablohu opened this issue Apr 16, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@Diablohu
Copy link
Member

Diablohu commented Apr 16, 2020

提供时,清理 node_modules/.cache

另外,koot-dev 的 DLL 做缓存

  • DLL 文件名 -> .dll.[dm5].js
  • md5 为 DLL 所有包名和版本号的综合
@Diablohu Diablohu added the enhancement New feature or request label Apr 16, 2020
@Diablohu
Copy link
Member Author

Diablohu commented May 6, 2020

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

[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
Copy link
Member Author

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

[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
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant