npm パッケージとして複数のエントリーポイントを公開したい場合、mainフィールドは単一のエントリーポイントしか受け付けないので、exportsフィールドを利用することになると思うけども、その仕様等についての確認メモ。 In a package’s package.json file, two fields can define entry points for a package: "main" and "exports". The "main" field is supported in all versions of Node.js, but its capabilities are limited: it only defines the main entry point of the package. https://nodejs.org/api/packages.html#p
![package.jsonのexportsフィールドについて](https://cdn-ak-scissors.b.st-hatena.com/image/square/e525631de864104f8a0e02dc1827129ad12edb6f/height=288;version=1;width=512/https%3A%2F%2Fres.cloudinary.com%2Fzenn%2Fimage%2Fupload%2Fs--fqTWQOSA--%2Fc_fit%252Cg_north_west%252Cl_text%3Anotosansjp-medium.otf_55%3Apackage.json%2525E3%252581%2525AEexports%2525E3%252583%252595%2525E3%252582%2525A3%2525E3%252583%2525BC%2525E3%252583%2525AB%2525E3%252583%252589%2525E3%252581%2525AB%2525E3%252581%2525A4%2525E3%252581%252584%2525E3%252581%2525A6%252Cw_1010%252Cx_90%252Cy_100%2Fg_south_west%252Cl_text%3Anotosansjp-medium.otf_37%3Amakotot%252Cx_203%252Cy_121%2Fg_south_west%252Ch_90%252Cl_fetch%3AaHR0cHM6Ly9zdG9yYWdlLmdvb2dsZWFwaXMuY29tL3plbm4tdXNlci11cGxvYWQvYXZhdGFyLzE5M2RmZGFhYWMuanBlZw%3D%3D%252Cr_max%252Cw_90%252Cx_87%252Cy_95%2Fv1627283836%2Fdefault%2Fog-base-w1200-v2.png)