Skip to content

Commit

Permalink
fix(storybook): use correct outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Sep 4, 2024
1 parent 1c3b07d commit f601907
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions packages/nx/src/native/cache/validate_outputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,16 @@ pub fn get_transformable_outputs(outputs: Vec<String>) -> Vec<String> {
.filter(|output| is_missing_prefix(output))
.collect()
}

#[cfg(test)]
mod test {
use super::is_missing_prefix;

#[test]
fn test_is_missing_prefix() {
assert!(is_missing_prefix("dist"));
assert!(is_missing_prefix("!dist"));
assert!(!is_missing_prefix("{workspaceRoot}/dist"));
assert!(!is_missing_prefix("!{workspaceRoot}/dist"));
}
}
2 changes: 1 addition & 1 deletion packages/storybook/src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ function normalizeOutputPath(projectRoot: string): string | undefined {
if (projectRoot === '.') {
return `{projectRoot}/storybook-static`;
} else {
return `{workspaceRoot}/{projectRoot}/storybook-static`;
return `{projectRoot}/storybook-static`;
}
}

Expand Down

0 comments on commit f601907

Please sign in to comment.