Currently there's a linter rule that requires that we put a specific path in our module field in our package.json (e.g. "module": "./dist-esm/src/index.js"), but this rule doesn't work for packages that have source-level shared code imports (such as keyvault, identity-cache-persistence, and identity-vscode).
For those packages, a deeper module entry is required: "module": "dist-esm/identity-vscode/src/index.js". This is required because the TypeScript compiler will deepen the output directory to make it a mirror of the input file root, which is increased by a directory level when we import from shared code folders.
Better logic for this rule is probably just to:
- Check if the path starts with
dist-esm/
- Check if the next components of the path are ancestors of the package folder
- Check if the path ends with
${packageName}/src/index.js