Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alias import for root directory #21

Merged
merged 2 commits into from
Jan 19, 2025
Merged

Add alias import for root directory #21

merged 2 commits into from
Jan 19, 2025

Conversation

kaakaa
Copy link
Owner

@kaakaa kaakaa commented Jan 19, 2025

Add build configuration to allow importing ts, tsx files using '@' alias for the root directory.

  • webapp/tsconfig.app.json

    • Add baseUrl property set to ..
    • Add paths property to map '@' alias to src directory.
  • webapp/vite.config.ts

    • Import resolve from 'path'.
    • Add resolve property with alias mapping '@' to src directory.
  • Update import statements in various files to use '@' alias:

    • webapp/src/components/PullRequests.tsx
    • webapp/src/components/scatter/LineAdditions.tsx
    • webapp/src/components/scatter/LineChanges.tsx
    • webapp/src/components/scatter/LineDeletions.tsx
    • webapp/src/components/Statistics.tsx
    • webapp/src/components/statistics/PullRequestsCount.tsx
    • webapp/src/components/statistics/ReposCount.tsx
    • webapp/src/components/Summary.tsx
    • webapp/src/DuckDB.tsx
    • webapp/src/main.tsx

For more details, open the Copilot Workspace session.

Add build configuration to allow importing ts, tsx files using '@' alias for the root directory.

* **`webapp/tsconfig.app.json`**
  - Add `baseUrl` property set to `.`.
  - Add `paths` property to map '@' alias to `src` directory.

* **`webapp/vite.config.ts`**
  - Import `resolve` from 'path'.
  - Add `resolve` property with `alias` mapping '@' to `src` directory.

* **Update import statements in various files to use '@' alias:**
  - `webapp/src/components/PullRequests.tsx`
  - `webapp/src/components/scatter/LineAdditions.tsx`
  - `webapp/src/components/scatter/LineChanges.tsx`
  - `webapp/src/components/scatter/LineDeletions.tsx`
  - `webapp/src/components/Statistics.tsx`
  - `webapp/src/components/statistics/PullRequestsCount.tsx`
  - `webapp/src/components/statistics/ReposCount.tsx`
  - `webapp/src/components/Summary.tsx`
  - `webapp/src/DuckDB.tsx`
  - `webapp/src/main.tsx`

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/kaakaa/ai-agent-statistics?shareId=XXXX-XXXX-XXXX-XXXX).
@kaakaa kaakaa requested a review from Copilot January 19, 2025 01:27

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 12 changed files in this pull request and generated no comments.

Files not reviewed (6)
  • webapp/tsconfig.app.json: Language not supported
  • webapp/src/components/PullRequests.tsx: Evaluated as low risk
  • webapp/src/components/Statistics.tsx: Evaluated as low risk
  • webapp/src/components/Summary.tsx: Evaluated as low risk
  • webapp/src/components/scatter/LineAdditions.tsx: Evaluated as low risk
  • webapp/src/main.tsx: Evaluated as low risk
@kaakaa kaakaa merged commit c0d6686 into main Jan 19, 2025
@kaakaa kaakaa deleted the add-alias-import branch January 19, 2025 01: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.

1 participant