silverwolf-x's picture
download
raw
764 Bytes
use anyhow::Result;
use turbo_rcstr::rcstr;
use turbo_tasks::Vc;
use turbo_tasks_fs::FileSystemPath;
use turbopack_core::resolve::options::ImportMapping;
use crate::next_import_map::get_next_package;
#[turbo_tasks::function]
pub async fn get_postcss_package_mapping(
project_path: FileSystemPath,
) -> Result<Vc<ImportMapping>> {
Ok(ImportMapping::Alternatives(vec![
// Prefer the local installed version over the next.js version
ImportMapping::PrimaryAlternative(rcstr!("postcss"), Some(project_path.clone()))
.resolved_cell(),
ImportMapping::PrimaryAlternative(
rcstr!("postcss"),
Some(get_next_package(project_path.clone()).await?),
)
.resolved_cell(),
])
.cell())
}

Xet Storage Details

Size:
764 Bytes
·
Xet hash:
688cea434f5d7dae5796343dc30c6168aa833da25eabb57feb007108a208b408

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