Closed angeloashmore closed 2 years ago
Merging #36 (b3f73dc) into main (38d1b24) will not change coverage. The diff coverage is
n/a
.:exclamation: Current head b3f73dc differs from pull request most recent head 783cb35. Consider uploading reports for the commit 783cb35 to get more accurate results
@@ Coverage Diff @@
## main #36 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 11 11
Lines 665 665
Branches 33 33
=========================================
Hits 665 665
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Types of changes
Description
This PR adds support for tree-shaking. Only used chunks (i.e. components, functions) from
@prismicio/next
are included in a Next.js app's JavaScript bundle.Without this PR,
@prismicio/next
's full bundle and its dependencies would be included in a Next.js app's JavaScript bundle.To accomplish this, Rollup's
preserveModules
option was enabled. This effectively disables bundling (at least in this package's case), preserving the source files (i.e. chunks). This allows Next.js's bundler to properly remove whole unused chunks from its output.As part of this change,
siroc
was replaced byunbuild
as a build tool.unbuild
results in better build output.Fixes #35
Checklist:
🦤