Output package manifest
Every build of an ESM view will generate a package manifest (package.json
), which will contain a selection of the original package.json
fields, plus a set of added / modified fields:
style
: the location of the js bundle (example:"style": "static/css/main.c6ac0a5c.css"
), useful for a host application to dynamically load the styles and add them to the page<head>
or the adopted stylesheet.styleImports
: An array of external CSS resources that the esm-view needs to import. Useful for host applications to load external CSS collaboratively (i.e. deduplicate common CSS when loading many esm-views)module
: the location of the js bundle (example:"module": "static/js/main.5077b483.js"
), useful for a host application to dynamically load the ESM view and render it in a React tree.dependencies
: an object containing all the dependencies imported in the package source (including the hoisted ones) and their correspondent version ranges.bundledDependencies
: an array of bundled dependencies. Sincedependencies
contains all the dependencies (bundled and not bundled), it is always possible to know which dependencies were rewritten and which were bundled.