-
Notifications
You must be signed in to change notification settings - Fork 449
Open
Description
The package.json file doesn't provide the following props (the values are for example):
{
"source": "src/index.js", // input
"main": "dist/foo.js", // CommonJS output bundle
"umd:main": "dist/foo.umd.js", // UMD output bundle
"module": "dist/foo.mjs", // ES Modules output bundle
"exports": {
"types": "./dist/foo.d.ts", // TypeScript typings for NodeNext modules
"require": "./dist/foo.js", // CommonJS output bundle
"default": "./dist/foo.modern.mjs", // Modern ES Modules output bundle
},
"types": "dist/foo.d.ts" // TypeScript typings
}And more importantly, doesn't do so for /safe. so importing it like import Colors from "colors/safe"; produces an error in some node configured environments. you'd have to import it like import Colors from "colors/safe.js";.
Didn't have the time to make a tested PR, just noted it for it in case, as a technical debt.
Example is from microbundle's README.
dyllandry and mrrs878
Metadata
Metadata
Assignees
Labels
No labels