silverwolf-x's picture
download
raw
582 Bytes
use anyhow::Result;
use turbo_rcstr::RcStr;
use turbo_tasks::Vc;
use turbo_tasks_fs::{FileSystem, FileSystemPath};
pub const VIRTUAL_PACKAGE_NAME: &str = "@vercel/turbopack-next";
#[turbo_tasks::function]
pub(crate) fn next_js_fs() -> Vc<Box<dyn FileSystem>> {
// [TODO]: macro need to be refactored to be used via turbopack-binding
turbo_tasks_fs::embed_directory!("next", "$CARGO_MANIFEST_DIR/js/src")
}
#[turbo_tasks::function]
pub(crate) async fn next_js_file_path(path: RcStr) -> Result<Vc<FileSystemPath>> {
Ok(next_js_fs().root().await?.join(&path)?.cell())
}

Xet Storage Details

Size:
582 Bytes
·
Xet hash:
2296d6e1e1fc023849489ca497e7d2857976d1bb42da2e14db614f5fbc7d3d74

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.