`main` field in `package.json`
See original GitHub issueThe browser
field already pointed to meriyah.umd.js
, shouldn’t main
point to meriyah.cjs.js
?
And browser
might want use the minified version?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (10 by maintainers)
Top Results From Across the Web
How to use the 'main' parameter in package.json?
The main field is a module ID that is the primary entry point to your program. That is, if your package is named...
Read more >Main property in package.json defines package entry point
First, Node looks for a package.json file and checks if it contains a main property. It will be used to point a file...
Read more >Modules: Packages | Node.js v19.3.0 Documentation
In a package's package.json file, two fields can define entry points for a package: "main" and "exports" . Both fields apply to ...
Read more >The Basics of Package.json in Node.js and npm - NodeSource
The main property of a package.json is a direction to the entry point to the module that the package.json is describing. In a...
Read more >Understand jsnext:main field in package.json : WEB-21827
There's informal jsnext:main field that can point to ES6 version of the package and it should be required instead of simple main when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As I understand
jsdelivr
looks forbrowser
https://github.com/prettier/prettier/pull/8387#issuecomment-633232840
We can add
unpkg
field forunpkg
I agree using .cjs on main field can better support what ever nodejs versions.