-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(turbopack): Enable tree shaking (#70114)
### What? - Supersedes #69344. - Enable tree shaking for production builds ### Why? The history of #69344 is too messy ### How? Closes PACK-3215
- Loading branch information
Showing
15 changed files
with
344 additions
and
52 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
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
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
Oops, something went wrong.