Skip to content

Dynamic alias#47

Merged
jalexy12 merged 2 commits intomainfrom
jalexy12/alias
May 22, 2025
Merged

Dynamic alias#47
jalexy12 merged 2 commits intomainfrom
jalexy12/alias

Conversation

@jalexy12
Copy link
Copy Markdown
Collaborator

We need a dynamic alias for tests to be able to build for tests etc.

Copilot AI review requested due to automatic review settings May 22, 2025 15:28
salvador-barboza

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces a hardcoded source alias with a dynamic one driven by an environment variable, allowing tests to override the project root.

  • Imported resolve from the path module and introduced a projectRoot constant with a fallback.
  • Changed the alias for '@' to resolve(projectRoot, 'src').
Comments suppressed due to low confidence (1)

vite.config.ts:19

  • [nitpick] The name projectRoot implies the workspace root but is used to resolve the source folder. Consider renaming it to sourceRoot or srcPath for clearer intent.
const projectRoot = process.env.PROJECT_ROOT || "/workspaces/spark-template/src"

Comment thread vite.config.ts Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jalexy12 jalexy12 merged commit 3ffb2d2 into main May 22, 2025
6 checks passed
@jalexy12 jalexy12 deleted the jalexy12/alias branch May 22, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants