Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Honestly, just delete the barrel files.

13,281 görüntüleme • 1 yıl önce •via X (Twitter)

14 Yorum

Jason Miller 🦊⚛ profil fotoğrafı
Jason Miller 🦊⚛1 yıl önce

🧵 So you think you know Barrel Files

Jason Miller 🦊⚛ profil fotoğrafı
Jason Miller 🦊⚛1 yıl önce

Problem #1: Dead code

Jason Miller 🦊⚛ profil fotoğrafı
Jason Miller 🦊⚛1 yıl önce

Problem #2: Reduced clarity

Jason Miller 🦊⚛ profil fotoğrafı
Jason Miller 🦊⚛1 yıl önce

Problem #3: Accidental import cycles

Jason Miller 🦊⚛ profil fotoğrafı
Jason Miller 🦊⚛1 yıl önce

Problem #4: Infrastructure strain

Jason Miller 🦊⚛ profil fotoğrafı
Jason Miller 🦊⚛1 yıl önce

Problem #5: Testing code shipped to production

Jason Miller 🦊⚛ profil fotoğrafı
Jason Miller 🦊⚛1 yıl önce

Problem #6: "Bin Files"

Jason Miller 🦊⚛ profil fotoğrafı
Jason Miller 🦊⚛1 yıl önce

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

Jason Miller 🦊⚛ profil fotoğrafı
Jason Miller 🦊⚛1 yıl önce

A magical debarrel plugin appears

Jason Miller 🦊⚛ profil fotoğrafı
Jason Miller 🦊⚛1 yıl önce

Tweak your tree shaking configuration (maybe)

Jason Miller 🦊⚛ profil fotoğrafı
Jason Miller 🦊⚛1 yıl önce

full talk here:

Michael Dougall profil fotoğrafı
Michael Dougall1 yıl önce

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

Anton Korzunov profil fotoğrafı
Anton Korzunov1 yıl önce

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

Jason Miller 🦊⚛ profil fotoğrafı
Jason Miller 🦊⚛1 yıl önce

Yeah the impact on jest and TS are big.

Benzer Videolar