All jobs / Frontend / web developer / Tooling
Frontend / web developer interview question · 5+ years
Shared packages in a monorepo keep causing diamond-dependency breaks. What do you enforce?
The strongest answer
Public package APIs, a changeset/version policy, and no deep imports into /src
Why it works
The public export map is the product. Deep imports and '*' versions are how diamonds appear.
What a good answer covers
- Treat package entrypoints as API.
- Export a public surface.
- Version through changesets.
- Ban deep /src imports and forced publishes.
Answers that fall short
- Close, but not the strongest: Always wildcard '*' versions
Wildcards make every install a different graph. - Weak: One package that contains everything
A monolith package just hides the diamond inside one name. - Red flag: Publish from a laptop with --force and skip CI
Forced laptop publishes skip the only review the graph gets.
Who gets asked this
More Tooling questions
- How do you run a frontend hiring loop that predicts the work, not trivia?
- A bad deploy blanks checkout in one browser. What is the incident response?
- A breaking change in the design system will hit forty apps. How do you ship it?
- You must remove a public hook from the platform package. How do you deprecate?
- Error rate spikes but only on a feature-flagged route. How do you set severity and act?
- Interviewers disagree on what 'senior frontend' means. How do you make hiring consistent?
- Frontend is on-call for a peak-traffic storefront. What does a good playbook include?
- How do you commit a CSS fix that accidentally includes a .env file in the working tree?