問題文
A developer needs a date formatting library for a new page inside packages/app. They are used to other repositories where all dependencies go into the root package.json. Where should they add this dependency in a Backstage project, and why?
選択肢
- In a new workspace created for shared libraries.
- In the package.json of packages/app, because each directory under packages is a separate workspace with its own dependencies.
- In the root package.json, so that every workspace in the repository resolves the same version of the library.
- In the package.json of packages/backend, because installs are driven from there.