brodybits / rollup-plugin-size-snapshot Goto Github PK
View Code? Open in Web Editor NEWThis project forked from trysound/rollup-plugin-size-snapshot
Track your library bundles size and its treeshakability with less effort
License: MIT License
This project forked from trysound/rollup-plugin-size-snapshot
Track your library bundles size and its treeshakability with less effort
License: MIT License
I think it would be nice to find a way to test the dist build, in a similar fashion to how I added CI dist build testing to react-recompose.
Prettier does this in a much more elaborate way when building new releases.
(updated)
Updates wanted for more stable v.0.7.2
patch release to be made from patch-v0.7.x
branch:
rollup-plugin-replace
to @rollup/plugin-replace
(as now proposed in PR #8)prerequisite: #7 โ
GENERAL RATIONALE:
patch-v0.7.x
branch:@rollup/plugin-replace
is not officially supported with Rollup pre-1.0, it would be ideal to avoid the need for testing & support with older Rollup 0.x versions if possibleUPDATED PREREQUISITE(S):
react-recompose
is upgraded to use Rollup 0.68 (as now proposed in react-recompose/react-recompose#25)SOME IMPORTANT NOTES:
v0.7.1-rc1
version of this fork is not to be considered "stable" (as now described in a commit message in PR #8)react-recompose
is upgraded to use Rollup 0.68 (see TODO item above)@rollup/plugin-replace
with Rollup pre-1.0 results in an ugly installation warning message (tradeoff vs using unsupported Rollup plugin package, as described in a commit message)general strategy for stable patch-v0.7.x
release:
First release from patch-v0.7.x
(v0.7.1-rc1
) was not intended to be 100% stable, and it is now desired to drop Rollup pre-0.68 support as described above. Now that a version patch-v0.7.x
is working with react-recompose
, it is desired to make a more stable v0.7.x patch release with the changes described above.
Accidentally published v0.14.0 with missing dist contents, discovered that npm silently ignores publish script ref:
Unfortunately npm does not let me unpublish this, deprecating it instead.
Published v0.14.1 with the dist contents included.
I am now maintaining patch-v0.7.x
branch to support react-recompose
with Rollup 0.x, with some upcoming updates as discussed in issue #8.
Assuming that I can update react-recompose
to use Rollup v2(+), with updates from main
branch of this plugin, then I would like to drop support for Rollup 0.x from patch-v0.7.x
branch.
I would like to support with both Rollup v2 & Rollup v3, as already proposed in PR #25 (in response to issue #24).
The hard part is adding GitHub CI testing with both Rollup v2 & v3, as the produce slightly different sizes as we can see in PR #25.
I think the best approach would be to define a special environmental variable in case of Rollup v2, in which case the tests would either expect different size results or expect some greater size variance.
/cc @geotrev
A couple issues were reported with handing errors from Terser:
A solution was proposed in issue #17, but I would need a reproduction in order to make a test case for this.
Any reproduction from the user community would be highly appreciated.
Note: It may be interesting to see oldest Node.js version that this will work on.
related:
(updated)
While investigating #17 further I have discovered some issues if the code is blank or has only comments.
I added some tests in fd305a4. I discovered a case where it started reporting an internal error rather than "No content" from Webpack, introduced in commit 03f414a in patch release v0.13.3
.
I have improved the error reporting in this case with a temporary workaround solution in 79a2ac5.
May need to investigate how Webpack would handle this kind of input in real life.
Some dependency updates will require minimum Node.js 14. This would be in a 0.x release.
UPDATED SCOPE:
Some dependencies should be updated to the most recent patch level if not release level before regenerating yarn.lock
Hello there!
Thanks for creating this package and maintaining it. I was wondering if there is any intent to adopt Rollup 3 support as a peer dependency in the near future?
Thanks!
Hi there, we've encountered a problem when the minified source does not output code
. Found on this line here, the error from terser v4.8.0
is not handled, but rather we see an error where the length of the minified code has no length (found here).
[!] (plugin size-snapshot) TypeError: Cannot read properties of undefined (reading 'length')
Wondering if the solution below would be welcomed to throw this error (pseudo-code):
const { code: minified, error: minifiedError } = minify(source);
if (minifiedError) {
throw minifiedError;
}
Happy to open up a pull request to patch.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.