Skip to content
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

Merged
merged 1 commit into from
Jun 5, 2024
Merged

Update rollup to v4.18.0 #113

merged 1 commit into from
Jun 5, 2024

Conversation

windowsair
Copy link
Contributor

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.

const watch = process.env.ROLLUP_WATCH;

export default {
input: 'src/index.ts',
output: [
{
file: pkg.main,
Copy link
Member

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

Copy link
Contributor Author

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()
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

@thegecko thegecko left a 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!

@thegecko thegecko merged commit b048feb into ARMmbed:master Jun 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants