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

deps: update to latest @rollup/plugin-typescript #13075

Merged
merged 1 commit into from Sep 16, 2021

Conversation

brendankenny
Copy link
Member

@brendankenny brendankenny commented Sep 16, 2021

We previously settled on @rollup/plugin-typescript@^2.1.0 even though that's pretty old (Jan 2020) because the latest versions were broken with our typescript setup. The rollup error messages were pretty inscrutable and not worth wading through since the old version was working fine (with the latest tsc as a peer dep).

#13072 (comment) kind of forces our hand because we want extends support in tsconfig files, so we need a more recent plugin. The fix isn't so bad, it just seems like you really really can't use a custom outDir. The readme gets into this a bit, but that workaround didn't work for me (nor did relocating the outDir to a few different places). Rather than torturing every path permutation until it worked, it's easier to just disable the custom outDir and any of the properties that force a custom outDir since we don't need any of those for the plugin's build anyways.

Also updates to typescript 4.4.3 because it has a bug fix (microsoft/TypeScript#45642) that fixes the plugin hanging forever with typescript 4.4.* builds.

@brendankenny brendankenny requested a review from a team as a code owner September 16, 2021 03:41
@brendankenny brendankenny requested review from connorjclark and removed request for a team September 16, 2021 03:41
@google-cla google-cla bot added the cla: yes label Sep 16, 2021
Comment on lines +45 to +50
// Plugin struggles with custom outDir, so revert it from tsconfig value
// as well as any options that require an outDir is set.
outDir: null,
composite: false,
emitDeclarationOnly: false,
declarationMap: false,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these override the values in the tsconfig file. Another common pattern is to have a tsconfig.rollup.json file alongside the tsconfig.json with these overrides in there instead. I'm fine with either approach, so whatever you'd prefer @adamraine

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like having the overrides here. LGTM.

Comment on lines +45 to +50
// Plugin struggles with custom outDir, so revert it from tsconfig value
// as well as any options that require an outDir is set.
outDir: null,
composite: false,
emitDeclarationOnly: false,
declarationMap: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like having the overrides here. LGTM.

@brendankenny brendankenny merged commit e77fef6 into master Sep 16, 2021
@brendankenny brendankenny deleted the rollup-typescript-update branch September 16, 2021 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants