Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 2.99 KB

HELPERS.md

File metadata and controls

57 lines (41 loc) · 2.99 KB

Remove the @ungap ponyfill modules from your bundle. This will decrease the size of your bundle if you are targeting modern browsers only or if your build already includes other polyfills. This has been tested with hyperHTML and lighterhtml bundles.

Run html-minifier on hyperHTML templates.

This can be used as an alternative to rollup-plugin-node-resolve, or can be used with certain node.js web servers to allow browsing live from source.

Known web server integrations:

This module copies the output of rollup builds to a stream of vinyl-fs objects for gulp. In addition it optionally adds files from modules that were bundled into the stream. This makes it easy to ensure that LICENSE and package.json files associated with bundled modules are published on the web server without publishing node.js server-side dependencies to the web. This can also be used to copy complete modules if required for licensing or if bundled code requires additional assets that are not part of the bundled JS (images for example).

If node_modules/some-web-component/index.js uses import.meta.url to calculate the actual path to node_modules/some-web-components/image.png, rollup does not compensate. This babel plugin rewrites references to import.meta.url so it points to the original location where it is expected that the additional assets (images and such) can be found. This plugin works well with vinyl-rollup with copyModules: true.