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

enahnce: unify resolve tsconfig #439

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

nnecec
Copy link
Contributor

@nnecec nnecec commented Jan 31, 2024

  • Cache the ts and ts config resolvers, only resolve once
  • Merge the tsconfig writer

Resolves #436

Copy link
Contributor Author

@nnecec nnecec left a comment

Choose a reason for hiding this comment

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

Are these the two resolve mentioned in #436?

src/bundle.ts Show resolved Hide resolved
src/bundle.ts Show resolved Hide resolved
@@ -183,18 +181,8 @@ export async function prepare(cwd: string): Promise<void> {
isTypescriptFile(filename),
)
if (hasTypeScriptFiles) {
isUsingTs = true
if (!fs.existsSync(tsconfigPath)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Found two same code at bundle and prepare file

src/typescript.ts Outdated Show resolved Hide resolved
src/build-config.ts Outdated Show resolved Hide resolved
@nnecec nnecec force-pushed the feat/unify-resolve-tsconfig branch from 381fb23 to b7e5a0c Compare February 1, 2024 10:23
@huozhi huozhi changed the title feat: unify resolve tsconfig enahnce: unify resolve tsconfig Feb 1, 2024
src/typescript.ts Outdated Show resolved Hide resolved
@huozhi
Copy link
Owner

huozhi commented Feb 1, 2024

Are these the two resolve mentioned in #436?
If we're alwyas using the 1st time resolved ts configs, yes it resolves that issue. Would be nice if you can write some description in the PR about what changed and what is resolved

src/typescript.ts Outdated Show resolved Hide resolved
src/typescript.ts Outdated Show resolved Hide resolved
@huozhi
Copy link
Owner

huozhi commented Feb 2, 2024

Could we also list the changes in the PR description? it's easier for reviewing and revisiting when we need to trace the PR changes later

I updated in the description, we can do it next time!

@huozhi huozhi merged commit f5caf7c into huozhi:main Feb 2, 2024
3 checks passed
@nnecec
Copy link
Contributor Author

nnecec commented Feb 3, 2024

Could we also list the changes in the PR description? it's easier for reviewing and revisiting when we need to trace the PR changes later

I updated in the description, we can do it next time!

Thanks for your advice. I'll write the description of the changes next time.

@nnecec nnecec deleted the feat/unify-resolve-tsconfig branch February 4, 2024 03:51
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.

Reduce times of tsconfig resolving
2 participants