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(config): vite.config.ts can't import untranspiled ts files from other packages in the same monorepo (#5370) #18146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alamhubb
Copy link

@alamhubb alamhubb commented Sep 19, 2024

fix(config): vite.config.ts can't import untranspiled ts files from other packages in the same monorepo (#5370)

Description

vite.config.ts support ts files from other packages in the same monorepo

If the file path contains node_modules, the file will not be compiled. If it does not contain node_modules, it means the local path, so it will be compiled.

Copy link

stackblitz bot commented Sep 19, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

@ferferga ferferga left a comment

Choose a reason for hiding this comment

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

Why not do it if the file ends in .ts, .mts, .cts regardless the location though?

@@ -1641,6 +1641,10 @@ async function bundleConfigFile(
}
throw e
}
// not nod_modules dependency, compile it #5370

Choose a reason for hiding this comment

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

Suggested change
// not nod_modules dependency, compile it #5370
// not node_modules dependency, compile it #5370

@alamhubb
Copy link
Author

Why not do it if the file ends in .ts, .mts, .cts regardless the location though?

Sorry, my English is not good, I don't quite understand what you said. I think this submission should have nothing to do with the suffix name, it just determines whether the file path contains node_modules, so you said, I can't think of what the relationship between them is, and it may be because I don't know the vite source code deeply enough.

@hi-ogawa
Copy link
Collaborator

The similar idea is already suggested in a different PR #17323

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.

3 participants