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

fix(tsc): remove fake global types holder #4196

Merged

Conversation

blake-newman
Copy link
Member

@blake-newman blake-newman commented Apr 2, 2024

composite projects currently do not rebuild efficently because we attach a fake place holder vue file. This is used to generate global types once for the project.

As the fake placeholder file is added the the roots file, the second build will detect a change because the root file does not exist for discovery with tsc.

Project 'packages/design-system/tsconfig.json' is out of date because buildinfo file
'packages/design-system/tsconfig.tsbuildinfo' indicates that file '[.../path/to/fake-file.vue]'
was root file of compilation but not any more.

remove adding the fake file to the roots, and instead apply the globals to the first vue file and then remove them when writing .d.ts.

@blake-newman blake-newman force-pushed the blake.newman/composite-projects branch from 4ceed5d to f2b373a Compare April 2, 2024 20:45
@blake-newman blake-newman changed the title fix(tsc): composite projects fix: composite projects Apr 2, 2024
@blake-newman blake-newman force-pushed the blake.newman/composite-projects branch 4 times, most recently from e49060a to 82bc942 Compare April 2, 2024 20:50
@johnsoncodehk johnsoncodehk mentioned this pull request Apr 2, 2024
42 tasks
@blake-newman blake-newman force-pushed the blake.newman/composite-projects branch 3 times, most recently from 5dae83a to b685836 Compare April 2, 2024 23:35
@johnsoncodehk
Copy link
Member

@blake-newman Made some adjustments, please let me know if this causes performance regression again in your project.

remove fake global types holder, instead extracting global types when
writing `.d.ts`. This allows composite projects to rebuild without
detecting changes which adjusting `options.rootNames` was causing
@blake-newman blake-newman force-pushed the blake.newman/composite-projects branch from 04d3e47 to 4da66a5 Compare April 3, 2024 08:31
@blake-newman blake-newman changed the title fix: composite projects fix(tsc): remove fake global types holder Apr 3, 2024
@johnsoncodehk johnsoncodehk merged commit bd1d954 into vuejs:master Apr 3, 2024
3 checks passed
@johnsoncodehk
Copy link
Member

Thanks!

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