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

使用 dayjs 替换 moment.js #87

Closed
x-cold opened this issue Jul 2, 2018 · 1 comment
Closed

使用 dayjs 替换 moment.js #87

x-cold opened this issue Jul 2, 2018 · 1 comment

Comments

@x-cold
Copy link
Member

x-cold commented Jul 2, 2018

1、moment.js 安全问题,moment/moment#4163
2、体积相较之下减少 90% 以上;
3、特性满足需求;

@x-cold
Copy link
Member Author

x-cold commented Jul 2, 2018

优化前:

> webpack --progress --hide-modules --config webpack.build.min.js && webpack --progress --hide-modules --config webpack.build.js
 18% building modules 72/73 modules 1 active .../N3-components/src/style/default.lessNode#moveTo was depreca
ted. Use Container#append.Hash: 5c5ffd2a379527e2e4a0
Version: webpack 2.7.0Time: 12137ms
        Asset    Size  Chunks                    Chunk Names
 index.min.js  504 kB       0  [emitted]  [big]  index
index.min.css  122 kB       0  [emitted]         index 18% building modules 72/73 modules 1 active .../N3-components/src/style/default.lessNode#moveTo was depreca
ted. Use Container#append.
Hash: f3a7695b07d9934216e8
Version: webpack 2.7.0
Time: 8799ms
        Asset     Size  Chunks                    Chunk Names
     index.js  1.41 MB       0  [emitted]  [big]  index
index.min.css   122 kB       0  [emitted]         index

优化后

18% building modules 72/73 modules 1 active .../N3-components/src/style/default.lessNode#moveTo was deprecated. Use Container#append.
Hash: 9a22112f812d27615216
Version: webpack 2.7.0
Time: 11243ms
        Asset    Size  Chunks                    Chunk Names
 index.min.js  276 kB       0  [emitted]  [big]  index
index.min.css  122 kB       0  [emitted]         index
 18% building modules 72/82 modules 10 active ...3-components/src/Locale/n3Validate.jsNode#moveTo was deprecated. Use Container#append.
Hash: b11e7f43ca4121eacea2
Version: webpack 2.7.0
Time: 8309ms
        Asset    Size  Chunks                    Chunk Names
     index.js  870 kB       0  [emitted]  [big]  index
index.min.css  122 kB       0  [emitted]         index

@x-cold x-cold closed this as completed Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant