Everything gets generated correctly inside the bin folder (content used for testing) but during the npm pack, expected Tarball contents are missing. After the fix:
Also, modified the package.json to specify a set of subpaths for different module types:
AMD: "require": "SDK.min.js"
ES: "import": "./esm/SDK.min.js"
Also, the main property and the exports property are not mutually exclusive and can be used together. The main property specifies the main entry point for the module, while the exports property specifies additional subpaths that can be imported by other modules.
Everything gets generated correctly inside the bin folder (content used for testing) but during the
npm pack
, expected Tarball contents are missing. After the fix:Also, modified the
package.json
to specify a set of subpaths for different module types:"require": "SDK.min.js"
"import": "./esm/SDK.min.js"
Also, the
main
property and theexports
property are not mutually exclusive and can be used together. Themain
property specifies the main entry point for the module, while theexports
property specifies additional subpaths that can be imported by other modules.