Modern Javascript Features 25-01-12
一些很甜的 JS 语法糖。 […] 当值为 nullish 时使用默认值。注意,nullish 和 truthy 不一样。 nullish: null or undefined. […] const foo = null ?? 'default string'; console.log(foo); // Expected output: …
使用 Happypack 优化 webpack 打包速度 21-09-12
一个 ionic app 本地编译需要 8 分钟,提交到流水线编译耗时需要近 40 分钟,从日志看到 webpack 打包步骤耗时最严重。 […] 初步判断是流水线使用的容器 CPU 性能较弱或者存储 mount 性能导致的。找流水线同事支持配置了一个纯内存编译流水线,发现还是很慢。接下来使用 webpack 的插件speed-measure-webpack-plugin监控性能。 …