@atomico/exports
is distributed as ESM, so your package.json
must define the property "type":"module"
for its use.compilacion
: if we want to use JS To TS, our code will largely be compiled, @atomico/exports
uses esbuild for itpackage.json#exports
: declare all paths to consume from our package.json
packages.json#types
: declares the main path of types for Typescriptpackages.json#typesVersions
: declare the subpaths, this is similar to package.json#exports but at the typescript level.package.json#main
: declares the main file, the main property is friendly to services like unpkg.com@atomico/exports
is a tool like CLI created by Uppercod to improve the construction of packages.json frontend when talking about export../src/*.{js,ts}
defines that all js and ts type files are exported inside the src folder, the exported files will be compiled thanks to Esbuild.@atomico/exports
will allow you to use exports as module/a, since it internally creates the exports
and typesVersions
properties within the package.json, to resolve this export you must use the following command:./src/*.{js,ts}
is just an expression, it can be modified with your file path.@atomico/exports
is to create the output files and associate them correctly with the package.json, the result is a modified package.json. the --watch
flag, allows you to modify your package.json but temporarily, this is ideal for monorepos that automate their publication through automation flows, you will keep a clean package in development that will only be decorated in production.