跳过导航
Honestly, just delete the barrel files.
0:00 / 0:26

Honestly, just delete the barrel files.

Jason Miller 🦊⚛

@_developit6.4万 位关注者

在 X 上查看
99 个赞下载原帖

13,295 次观看

Honestly, just delete the barrel files.

14 条评论

评论来自 X (Twitter) 上的原帖

  • Jason Miller 🦊⚛ 的头像

    @_developit

    🧵 So you think you know Barrel Files

    740 个赞

  • Jason Miller 🦊⚛ 的头像

    @_developit

    Problem #1: Dead code

    32 个赞

  • Jason Miller 🦊⚛ 的头像

    @_developit

    Problem #2: Reduced clarity

    22 个赞

  • Jason Miller 🦊⚛ 的头像

    @_developit

    Problem #3: Accidental import cycles

    22 个赞

  • Jason Miller 🦊⚛ 的头像

    @_developit

    Problem #4: Infrastructure strain

    26 个赞

  • Jason Miller 🦊⚛ 的头像

    @_developit

    Problem #5: Testing code shipped to production

    17 个赞

  • Jason Miller 🦊⚛ 的头像

    @_developit

    Problem #6: "Bin Files"

    17 个赞

  • Jason Miller 🦊⚛ 的头像

    @_developit

    Some solutions! To start... can linting help?

    17 个赞

  • Jason Miller 🦊⚛ 的头像

    @_developit

    A magical debarrel plugin appears

    62 个赞

  • Jason Miller 🦊⚛ 的头像

    @_developit

    Tweak your tree shaking configuration (maybe)

    16 个赞

  • Jason Miller 🦊⚛ 的头像

    @_developit

    full talk here:

    127 个赞

  • Michael Dougall 的头像

    @dougesdev

    @flexdinesh 4r. Shopify sending it for no barrel? Atlassian started migrating Jira recently, huge improvements across the board

    4 个赞

  • Anton Korzunov 的头像

    @theKashey

    We just did that Rewrote all imports directly to what they need and deleted thousands of barrel files It helped not only with bundling, but boosted tests and even typescript

    2 个赞

  • Jason Miller 🦊⚛ 的头像

    @_developit

    Yeah the impact on jest and TS are big.