Open popham opened 6 years ago
By used it means used by JSPM. It actually is used. I think the documentation needs to be updated.
For example, say that the jspm section of your package specifies files that are distributed in a format other than CommonJS. This could be amd, esm, global, etc.
By specifying that property you provide metadata that enables the package to be loaded and bundled correctly.
For example, in the case of esm, people installing your package will be able to take advantage of rollup optimizations when they create a production build. It also means that the SystemJS loader doesn't have to attempt module format detection heuristics which enables your package to be transpiled faster and with no ambiguity as to format.
Actually, I believe the documentation is saying that the property is not considered if it is not nested under the jspm section.
I'm adding a
jspm
section to a library of mine, but I'm confused by Configuring-Packages-for-jspm. What does "Module formatesm
(ECMAScript Module) currently isn't used in package.json" mean? In particular, "isn't used" by whom?