diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-02-22 23:21:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-22 23:21:05 +0100 |
commit | 1c14127c4f54d815b3e1be48bddd5198dcb33a50 (patch) | |
tree | 56dbbea5e9a39fc95d3c722811b47bce08e21b59 /cli/tools | |
parent | c18e0d1d37878bb4441f7f8d339cc23ac8e68448 (diff) |
feat: support bare specifier resolution with package.json (#17864)
This commit enables resolution of "bare specifiers" (eg. "import express
from 'express';") if a "package.json" file is discovered.
It's a step towards being able to run projects authored for Node.js
without any changes.
With this commit we are able to successfully run Vite projects without
any changes to the user code.
---------
Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/tools')
-rw-r--r-- | cli/tools/info.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/tools/info.rs b/cli/tools/info.rs index 8a7f4b6b9..d120cb89f 100644 --- a/cli/tools/info.rs +++ b/cli/tools/info.rs @@ -34,7 +34,7 @@ pub async fn info(flags: Flags, info_flags: InfoFlags) -> Result<(), AnyError> { let ps = ProcState::build(flags).await?; if let Some(specifier) = info_flags.file { let specifier = resolve_url_or_path(&specifier)?; - let mut loader = ps.create_graph_loader(); + let mut loader = ps.create_graph_loader()?; loader.enable_loading_cache_info(); // for displaying the cache information let graph = ps .create_graph_with_loader(vec![specifier], &mut loader) |