-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update rollup to v4.18.0 #113
Conversation
rollup.web.config.mjs
Outdated
const watch = process.env.ROLLUP_WATCH; | ||
|
||
export default { | ||
input: 'src/index.ts', | ||
output: [ | ||
{ | ||
file: pkg.main, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason this method was removed, its easier to get this directly from package.json rather than maintaining 2 magic strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's been fixed.
The initial build is much faster than the previous version: 35s -> 5s.
typescript({ | ||
useTsconfigDeclarationDir: true | ||
}), | ||
terser(), | ||
sourceMaps() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do sourcemaps still appear through another method or is this an oversight removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that's intentional. Rollup looks like generates sourcemap. I can see them in the dist directory.
https://rollupjs.org/configuration-options/#output-sourcemap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates!
Hi,
This patch involves a major change to rollup, updating it from v2 to v4. The most obvious difference is the build speed, which was reduced from 35s to 5s on my machine when perform initial building.
There are quite a few changes due to the large span of version numbers. Looking forward to your review, thank you.