{
"exports": {
".": "./dist/index.js",
// In addition to ☝
"./*.js": "./dist/*.js"
}
}
to allow:
import { isObject } from "is-what/isObject.js"
or if we used default exports
import isObject from "is-what/isObject.js"
this is in the spirit of keeping the package as light as possible. This way, even if your target environment doesn't do bundling/tree-shaking, you can still manually "treeshake" in your code to only import what's needed.
Basically add this to package.json
to allow:
or if we used default exports
this is in the spirit of keeping the package as light as possible. This way, even if your target environment doesn't do bundling/tree-shaking, you can still manually "treeshake" in your code to only import what's needed.
cc @mesqueeb is this a good idea?