feat: allow globs in node_modules when pattern is explicit#6056
feat: allow globs in node_modules when pattern is explicit#6056patak-cat merged 3 commits intovitejs:mainfrom
Conversation
bluwy
left a comment
There was a problem hiding this comment.
This looks good to me, but I'm not entirely clear of the usecase for globbing into node_modules. Usually those are pre-bundled, though globbing on package assets like CSS, SVGs might make sense, but I think the package should have an API to do that by default either ways.
|
@patak-dev @bluwy Thanks for checking! On top of that, in Hydrogen we use Yarn v1 workspaces (monorepo) and we are hoisting components to the root This is not blocking us right now but it will if that PR I linked is merged/released -- so feel free to take time to ask the team or suggest other ideas 👍 |
|
@frandiox could you resolve the conflicts? We talked with the team and we can merge the PR 👍🏼 |
|
@patak-dev Done, thanks! |
Description
Currently, we cannot use
import.meta.globfor files innode_modules. This can be useful sometimes in development environments, especially considering that Vite treats relative and absolute paths differently.This PR prevents ignoring
node_modulesin globs when the pattern is explicitly checking it.Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).