Skip to content

turbopack-230418.3

@kwonoj kwonoj tagged this 18 Apr 07:14
### Description

Attempt to close WEB-862.

Currently turbopack in next-swc applies all of moduleoptionscontext into
any kind of internal assets. Current available contextcondition
(`ContextCondition::InDirectory`) does not gives enough context to
determine where it comes from, makes non trivial to determine if given
context need to be treated differently.

~I'm trying to workaround by supplying addtional context for the
filesystemkind, and caller can use it for creating a new
contextcondition. In case of turbopack, I assume any embedded assets in
the binary won't be an external / user's. Next-swc will assign a new
condition like
https://github.com/vercel/next.js/compare/canary...client-context-embedded-fs#diff-92086db0c6bc192f76dab5d612a562df8fddffea05244c1c00d58e7288879e11R213-R214.~

~Still bit unsure if this is a legit apporach or would be better way to
go. PR is for the POC + further improvement based on the feedback.~

Per review suggestion, this PR now supports `InPath(FileSystemVc)` as
new condition instead.
Assets 2
Loading