Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
bd663f91
Unverified
Commit
bd663f91
authored
Jan 10, 2025
by
Niklas Mischkulnig
Committed by
GitHub
Jan 10, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turbopack: add flag to switch between envs (#74135)
parent
2514e133
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
139 additions
and
64 deletions
+139
-64
arguments.rs
turbopack/crates/turbopack-cli/src/arguments.rs
+25
-1
mod.rs
turbopack/crates/turbopack-cli/src/build/mod.rs
+114
-63
No files found.
turbopack/crates/turbopack-cli/src/arguments.rs
View file @
bd663f91
...
...
@@ -3,7 +3,9 @@ use std::{
path
::{
Path
,
PathBuf
},
};
use
clap
::{
Args
,
Parser
};
use
clap
::{
Args
,
Parser
,
ValueEnum
};
use
serde
::{
Deserialize
,
Serialize
};
use
turbo_tasks
::{
NonLocalValue
,
TaskInput
};
use
turbopack_cli_utils
::
issue
::
IssueSeverityCliOption
;
#[derive(Debug,
Parser)]
...
...
@@ -23,6 +25,24 @@ impl Arguments {
}
}
#[derive(
Copy,
Clone,
Debug,
ValueEnum,
PartialEq,
Eq,
Serialize,
Deserialize,
Hash,
TaskInput,
NonLocalValue,
)]
pub
enum
Target
{
Browser
,
Node
,
}
#[derive(Debug,
Args,
Clone)]
pub
struct
CommonArguments
{
/// The entrypoints of the project. Resolved relative to the project's
...
...
@@ -61,6 +81,10 @@ pub struct CommonArguments {
/// MB.
#[clap(long)]
pub
memory_limit
:
Option
<
usize
>
,
/// Target
#[clap(long)]
pub
target
:
Option
<
Target
>
,
}
#[derive(Debug,
Args)]
...
...
turbopack/crates/turbopack-cli/src/build/mod.rs
View file @
bd663f91
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment