hardfist Profile
hardfist

@hardfist_1

Followers
2,033
Following
772
Media
41
Statuses
1,671

Developer @ByteDanceTalk , Project lead for @rspack_dev , Opinions are my own

People's Republic of China
Joined November 2016
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
@hardfist_1
hardfist
2 years
一天,大师在办公室看到一个实习生在跟TypeScript较劲——他试图不断添加any来让tsc编译成功。 大师叫住实习生:“你这样是很不专业的,你必须要理解编译失败的深层次原因”。 说罢,大师熟练地进行各种类型体操,端详许久。最后在n个地方添加了 as any。 tsc果然编译成功了。
@disksing
象牙山刘能
2 years
一天,大师在办公室看到一个实习生在跟k8s较劲——他试图不断重设replicas数量来让服务部署成功。 大师叫住实习生:“你这样是很不专业的,你必须要理解Pod调度失败的深层次原因”。 说罢,大师熟练地运行kubectl describe,端详许久。最后kubectl edit重新设置了replicas。 Pod果然部署成功了。
17
28
310
5
15
186
@hardfist_1
hardfist
1 year
前端四大配置浪漫,monorepo 怎么配,webpack 怎么配,package exports 怎么配, tsconfig 怎么配
14
10
132
@hardfist_1
hardfist
3 months
I want to write a little book about bundler plugin design, anyone interested 😃?
16
6
109
@hardfist_1
hardfist
2 years
见识到了那么多monorepo的滥用,都违背了monorepo的一个最基本的初衷, 重要的不是单一仓库,重要的是单一版本 monorepo最大的收益是来自单一版本的衍生收益,而非单一仓库的衍生收益, 只进行了单一仓库而不进行单一版本控制的monorepo都是假monorepo
Tweet media one
8
9
82
@hardfist_1
hardfist
11 months
招人啦,海量HC
26
7
80
@hardfist_1
hardfist
3 months
After 30 mins hackathon, @docusaurus is running on @rspack_dev
4
12
73
@hardfist_1
hardfist
4 years
@himself_65 年年岁岁gre,岁岁年年abandon
0
0
57
@hardfist_1
hardfist
7 months
持续招人中,有小伙伴看机会吗?
Tweet media one
10
7
51
@hardfist_1
hardfist
10 months
补充另一个视角,愿意把项目的缺点正大光明在文档里说出来这点是很多项目都做不到,这点很值得学习
@noworkforsixian
Sixian
10 months
React 的新版官方文档太棒了,把许多坑都直接列了出来,并用心地附上了例子解释这样为什么错,会导致什么样的问题,非常直观。我一直觉得掌握一个东西最有效的方法就是先 break it,知道它为什么坏,就能了解当前的设计到底是在解决什么问题。 文档里让我收获最大的是关于 Effect
Tweet media one
27
91
649
4
2
40
@hardfist_1
hardfist
1 month
After solving the webpack-virtual-modules compatibility problem, I finally made nuxt.js run on Rspack.
2
3
36
@hardfist_1
hardfist
3 months
With the help of @ScriptedAlchemy , My GitHub Sponsors profile is finally live! You can sponsor me to support my open source work 💖
2
8
36
@hardfist_1
hardfist
25 days
Analyzing Rspack performance bottlenecks revealed stark differences between large real complexand small simple projects. Small projects often bottleneck on Rust tools, while real-world large projects typically bottleneck on JS tools (like Less, Sass, Tailwind、custom plugin). 🤣
2
4
30
@hardfist_1
hardfist
1 year
Is there an article about how esm&cjs interop should work in detail in bundler. I know the but want to know more
4
2
29
@hardfist_1
hardfist
1 year
Open Source is not free, especially for large projects
Tweet media one
0
3
29
@hardfist_1
hardfist
1 year
@yagiznizipli i started to hate this whole ecosystem because of things like this,there is no lower limit for what some people can do
0
0
28
@hardfist_1
hardfist
2 years
Typescript configuration becomes complex than webpack configuration for me 😀
4
1
26
@hardfist_1
hardfist
2 months
These feedbacks are so encouraging
Tweet media one
@hardfist_1
hardfist
2 months
The best part of my work is reading these encouraging migration articles 🥰
0
0
4
0
1
25
@hardfist_1
hardfist
10 months
Parcel documentation explains lots of bundler concept very well,give it a read even if you dont use it.
1
2
24
@hardfist_1
hardfist
5 months
This is game changer which will make type checking in @rspack_dev project much faster
Tweet media one
@typescript
TypeScript
5 months
TypeScript 5.5 RC is now out to try! We're looking for feedback on inferred type predicates, JSDoc imports, regex checking, ${configDir}, isolatedDeclarations, build optimizations, and more!
7
113
534
0
3
24
@hardfist_1
hardfist
10 months
💖 I'm sponsoring @biomejs because… it is really a great tool,you should try it
0
2
24
@hardfist_1
hardfist
1 year
please write a tool to auto generate this for library author,too many rules to consider
@atcb
Andrew Branch
2 years
Let’s look at each piece of this to go over what it does, why it is (or more often *isn’t*) needed, and why I can tell this package.json is misconfigured just from this small snippet. 🧵
27
153
1K
7
2
23
@hardfist_1
hardfist
1 year
want to take a long holiday away from this whole toxic ecosystem. tools should be used to help each other than attacking each other.
2
0
22
@hardfist_1
hardfist
2 years
What are your most frequently used loaders and plugins in webpack ecosystem?
17
6
21
@hardfist_1
hardfist
1 year
@leeerob @biomejs @bunjavascript @rspack_dev is also a big part of the process 👀
0
0
20
@hardfist_1
hardfist
1 year
💖 I'm sponsoring napi-rs because… @rspack_dev is impossible without @napi_rs , great work by @Brooooook_lyn and the team!
1
2
20
@hardfist_1
hardfist
2 months
💖 I'm sponsoring @sanxiaozhizi because his great help with Rspack unplugin support 🥰
1
2
20
@hardfist_1
hardfist
11 months
That is why we all bet on @rspack_dev to unify compiler in bytedance,it is the only solution meets all our needs for different scenarios and scales from small apps to really huge apps.
@alexUX_UI
Alex
11 months
@PatrickJS__ @QwikDev @rspack_dev @webpack @mhevery Yep! Tons of use cases for big orgs to have everyone on the same compiler. It’s one of the only ways to guarantee architectural conformance and governance. The compilation is the most critical part of the software supply chain.
2
0
5
1
3
19
@hardfist_1
hardfist
3 years
国内有不依赖babel-plugin-import的组件库吗。。。😞
11
0
19
@hardfist_1
hardfist
11 months
很不错的vue项目迁移Rspack实践总结
1
1
19
@hardfist_1
hardfist
11 months
Surprisingly it is the persistent cache, fast prebundle of esbuild and the lazy compilation brought by esm that make Vite perform quickly, while the bundleless brought by esm actually slows down Vite. lazy compilation, persistent cache and fast bundle are the key, not bundleless.
@rauchg
Guillermo Rauch
11 months
@rspack_dev I really really wanted bundleless to work. Such an attractively simple solution! We built @nextjs Live in part to test out this hypothesis. Everything was “browser native”, from ESM to the the runtime (WinterCG). Then we tested it with Vercel’s homepage. 30s+ load times.
6
7
124
0
5
18
@hardfist_1
hardfist
1 year
feeling very depressed,dont want to work on developer tools anymore
@yagiznizipli
Yagiz Nizipli
1 year
🫡
9
12
352
1
1
19
@hardfist_1
hardfist
2 years
@antfu7 first class citizen in nearly every tools
2
0
19
@hardfist_1
hardfist
1 year
esm is too buggy to use right now at least in node.js 😭
@deno_land
Deno
1 year
It's 2023 — time to say ❌ to CommonJS.
19
170
924
6
1
18
@hardfist_1
hardfist
3 months
That is so cute,favorite one so far
@rspack_dev
Rspack
3 months
We have just finished the logo design for Rslib, a wizard who is skilled in building libraries 🪄
Tweet media one
7
26
164
2
0
17
@hardfist_1
hardfist
11 months
Bazel's slogan is my favorite slogan
Tweet media one
0
3
16
@hardfist_1
hardfist
2 years
@sapphi_red upgrade rspack to latest version and see the result, rspack do watch debounce(just like webpack) so it's slow in benchmark before.
Tweet media one
4
6
17
@hardfist_1
hardfist
11 months
Need new MacBook with at least 2T disk to develop @rspack_dev 🤣
Tweet media one
4
2
16
@hardfist_1
hardfist
3 years
@acemarke its very easy to write a vite plugin to support tscheck,
1
2
16
@hardfist_1
hardfist
2 years
@antfu7 @rspack_dev rspack doesnt have but i have
0
0
16
@hardfist_1
hardfist
1 year
别人说好才是好 🥰
@rspack_dev
Rspack
1 year
10x faster is real, give it a try!
Tweet media one
4
6
44
1
0
16
@hardfist_1
hardfist
5 months
The root cause is Typescript lacks single file compilation unit model(Rust seems have same problem), which limits lots of optimization, isolatedDeclarations may solve this problem so bundlers | compilers can actually do some optimization cross module boundary.
@cpojer
Christoph Nakazawa
5 months
Do not use `import type` unless you need to.
Tweet media one
33
23
349
1
5
12
@hardfist_1
hardfist
1 year
@Shenqingchuan 一个文件里写n个组件
4
0
15
@hardfist_1
hardfist
2 years
@sinoon1218 请客吃饭却可以研发提效
1
0
13
@hardfist_1
hardfist
3 years
@jarredsumner node already support this
1
0
14
@hardfist_1
hardfist
16 days
I'm wondering whether bundler & compiler should keep following Node.js new features like `module-sync`, It seems tools should be runtime agnostic, so why should we keep following Node.js specific new behavior other than Deno's or Bun's. I hope JS0 can solve these things 😅.
4
1
15
@hardfist_1
hardfist
1 month
The abstraction of Nuxt.js on different bundlers( vite & webpack) is really great. So I only need to modify @nuxt /webpack-builder code and don't need to care too much about how Nuxt.js plugin works 😂
@hardfist_1
hardfist
1 month
After solving the webpack-virtual-modules compatibility problem, I finally made nuxt.js run on Rspack.
2
3
36
2
3
15
@hardfist_1
hardfist
2 years
OnCall风格api
Tweet media one
2
0
14
@hardfist_1
hardfist
2 years
The more I learn webpack, The more I admire it's outstanding design, even the source code is so hard to read.
1
0
15
@hardfist_1
hardfist
10 months
@0linecode @ScriptedAlchemy rspack supports MF out of box and will be released in 0.5
0
1
14
@hardfist_1
hardfist
2 years
写综述类文档讲究一鼓作气、再而衰、三而竭 看着写了一大半的一片文档,再也没兴致捡起来继续写 😭
2
0
14
@hardfist_1
hardfist
3 months
非常棒的企业迁移Rspack实践,这也是我们做Rspack的初衷,可以帮助企业用户无痛的渐进式迁移。
0
2
14
@hardfist_1
hardfist
8 months
Great job! Another bundler supports bundle splitting
@devongovett
Devon Govett
8 months
📢 Parcel v2.12.0 brings support for macros, a new web-based REPL, improved CSS bundling, and manual code splitting! Macros are JS/TS functions that run at build time instead of being bundled. They can generate constants, code, and even assets (eg css)!
Tweet media one
9
42
296
0
1
14
@hardfist_1
hardfist
1 year
webpack's treeshaking is much complex than other tools, especially reexport optimization😂
1
2
14
@hardfist_1
hardfist
9 months
@yofine2js @quanruzhuoxiu @Huxpro 为什么不回我微信? forget了
1
0
13
@hardfist_1
hardfist
1 year
my new wishlist is next.js on Rspack
@aidenybai
Aiden Bai
1 year
my new wishlist is next.js on vite
7
3
122
2
1
13
@hardfist_1
hardfist
1 year
As tools and frameworks become increasingly complex and hard to debug, the next competitive focus for frameworks and tools may be devtools or called self-diagnostic capabilities.
2
2
13
@hardfist_1
hardfist
1 year
after hours debugging a project with tons of circular dependencies, I found out a *bug* of rspack is actually user's code bug, and webpack's treeshaking remove the buggy code so it runs successfully but rspack doesn't remove the buggy code so it failed. negatives make a positive
@hardfist_1
hardfist
1 year
webpack's treeshaking is much complex than other tools, especially reexport optimization😂
1
2
14
3
1
13
@hardfist_1
hardfist
6 months
the sideEffect field should be renamed as “you can safely remove me from connection if no one use the exported variable from the module”
@_developit
Jason Miller 🦊⚛
6 months
@devongovett @Rich_Harris sideEffects:false does nothing _within_ modules. It's okay for passing through a barrel file, but the second that barrel file contains a side effect you're into "configure bundler to make packages not suck" territory
2
1
3
0
5
13
@hardfist_1
hardfist
1 year
@magic_akari 这也是很多库一直不发1.x的原因
2
0
13
@hardfist_1
hardfist
1 year
find a tricky case in @bunjavascript and it's about hybrid cjs & esm interop is hard
Tweet media one
3
1
12
@hardfist_1
hardfist
2 years
巨大的oncall成本,令人绝望💩💩💩💩💩💩💩💩💩💩
6
0
13
@hardfist_1
hardfist
1 month
you can play with it here 🥰
@hardfist_1
hardfist
1 month
After solving the webpack-virtual-modules compatibility problem, I finally made nuxt.js run on Rspack.
2
3
36
0
3
13
@hardfist_1
hardfist
1 year
a big step towards webpack compatible
@rspack_dev
Rspack
1 year
A bunch of awesome new features out today for Rspack v0.3.4 🍿 internal plugins support like DefinePlugin ❤️ compatible with html-webpack-plugin ! 🚀 builtin:swc-loader supports builtin transformation like emotion
Tweet media one
0
9
52
1
3
12
@hardfist_1
hardfist
2 years
每天一个nodejs冷知识, 当你的node-modules里的模块名和node内置模块重名的时候,require.resolve(id)应该resolve到默认模块还是node-modules的模块。
Tweet media one
1
0
12
@hardfist_1
hardfist
2 years
peerDependencies in monorepo is so fucking hard
3
1
11
@hardfist_1
hardfist
4 months
@devongovett @t3dotgg thats our fault,will add parcel section in Rspack website soon
0
0
12
@hardfist_1
hardfist
11 months
We're hiring!
@hardfist_1
hardfist
11 months
招人啦,海量HC
26
7
80
2
0
12
@hardfist_1
hardfist
9 months
RSC is React Component implements Send Trait,React Sendable Component!
@ScriptedAlchemy
Zack Jackson
9 months
I understand RSC a little better now as @ebey_jacob made a federation POC. “Use client” is normal ssr/csr. RSC is “thread safe” react components. Meaning I can execute them off main thread. Be it server, web worker, or whatever.
2
4
63
2
1
12
@hardfist_1
hardfist
1 year
3
0
12
@hardfist_1
hardfist
11 months
@Shenqingchuan 我们招人
1
0
11
@hardfist_1
hardfist
10 months
The implementations of webpack and the C++ linker have many similarities, which is very interesting.
5
1
11
@hardfist_1
hardfist
2 months
--experimental-transform-types is really a great feature, that's the feature I want for long time. Great work by @satanacchio @kdy1dev , I don't want introduce xxx-register just to support xxx.config.ts .
0
3
11
@hardfist_1
hardfist
3 months
I originally thought it's funny name, but now I want to make it a real project. the goal becomes write a real bundler from scratch with minimal api and performance consideration and focused on the bundler architecture.
@hardfist_1
hardfist
3 months
not sure anyone will like it, I may try use this to polish Rspack's Rust API
1
8
48
2
1
11
@hardfist_1
hardfist
10 months
I make a repo to check different bundler behavior about circular-dependency, it turns out esbuild is the only one not following standard semantic because of the const transpiled to var which breaks TDZ, welcome more complicated cases for discussion
1
1
11
@hardfist_1
hardfist
11 months
Hope someone can set a bounty for webpack
@biomejs
Biome
11 months
We are thrilled to announce that we have exceeded the 95% compatibility required by the challenge and we are continuing to improve this score! We will be submitting our solution in the coming days. Stay tuned!
5
70
807
2
2
11
@hardfist_1
hardfist
2 years
@zenia2020 @antfu7 @rspack_dev @sanxiaozhizi vite is fastest and rspack is fast enough
0
1
11
@hardfist_1
hardfist
7 months
this is huge, solve the biggest blocker of esm adoption
@JoyeeCheung
Joyee Cheung
7 months
Landed experimental support for synchronous require(esm) to load ES modules without top-level await 🥳
28
150
603
1
2
11
@hardfist_1
hardfist
10 months
I finally reproduce the treeshaking breaks TDZ case, I'm not sure whether treeshaking should keeps TDZ code, it actually bites me in real world project and I think it's the reason why people think webpack supports non-standard circular dependency.
@hardfist_1
hardfist
1 year
after hours debugging a project with tons of circular dependencies, I found out a *bug* of rspack is actually user's code bug, and webpack's treeshaking remove the buggy code so it runs successfully but rspack doesn't remove the buggy code so it failed. negatives make a positive
3
1
13
2
1
10
@hardfist_1
hardfist
1 year
@youyuxi we should argue about which framework is more ChatGPT friendly now 😆
1
1
10
@hardfist_1
hardfist
2 years
每天一个js|ts新知识: d.ts的parser逻辑和ts的parser逻辑不一样,和js的也不一样
Tweet media one
2
0
10
@hardfist_1
hardfist
9 months
Unfortunately typescript config support is still a mess after so many years, It seems none of them is perfect yet, all have some edge cases 😂
@hardfist_1
hardfist
9 months
still frustrated when using ESM in Node.js 😂
Tweet media one
2
1
9
1
2
10
@hardfist_1
hardfist
1 year
Webpack is the react version of build system and Turobopack is the vue version of build system.
@ahabhgk
Gengkun
1 year
Enlightening talk! The recompute part is exquisite!
0
0
7
1
0
10
@hardfist_1
hardfist
7 months
nice illustrations
@rspack_dev
Rspack
7 months
Rspack can now optimize re-exported modules using the new tree shaking algorithm. This helps to remove unused modules and reduce output size:
Tweet media one
2
22
108
0
0
10
@hardfist_1
hardfist
2 years
Design a good plugin system is so hard😀
1
0
10