-
Notifications
You must be signed in to change notification settings - Fork 27.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enable tree shaking of turbopack (#66689)
### What? Enable tree shaking of turbopack. ### Why? Verify the implementation and improve the bundle size. ### How? Closes PACK-3111 --------- Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
- Loading branch information
Showing
8 changed files
with
117 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
use turbo_tasks::{RcStr, Vc}; | ||
|
||
pub(crate) mod resolve; | ||
pub(crate) mod transforms; | ||
pub(crate) mod webpack_rules; | ||
|
||
#[turbo_tasks::function] | ||
pub fn next_js_special_exports() -> Vc<Vec<RcStr>> { | ||
Vc::cell( | ||
[ | ||
"config", | ||
"middleware", | ||
"runtime", | ||
"revalidate", | ||
"dynamic", | ||
"dynamicParams", | ||
"fetchCache", | ||
"preferredRegion", | ||
"maxDuration", | ||
"generateStaticParams", | ||
"metadata", | ||
"generateMetadata", | ||
"getServerSideProps", | ||
"getInitialProps", | ||
"getStaticProps", | ||
] | ||
.into_iter() | ||
.map(RcStr::from) | ||
.collect::<Vec<RcStr>>(), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters