[PR #303] [CLOSED] Webpack Alias: Added Lib alias #718

Closed
opened 2026-03-03 00:22:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BoostIO/BoostNote-App/pull/303
Author: @shmolf
Created: 1/18/2020
Status: Closed

Base: masterHead: lib-alias


📝 Commits (1)

  • b3f92b9 Webpack Alias: Added Lib alias

📊 Changes

110 files changed (+272 additions, -262 deletions)

View changed files

📝 src/components/App.tsx (+14 -14)
📝 src/components/AttachmentsPage/AttachmentList.tsx (+6 -6)
📝 src/components/AttachmentsPage/AttachmentsPage.tsx (+5 -5)
📝 src/components/CodeMirrorStyle.tsx (+1 -1)
📝 src/components/ContextMenu/ContextMenu.tsx (+1 -1)
📝 src/components/ContextMenu/styled.ts (+3 -3)
📝 src/components/Dialog/Dialog.tsx (+2 -2)
📝 src/components/Dialog/DialogIcon.tsx (+1 -1)
📝 src/components/Dialog/MessageBoxDialogBody.tsx (+1 -1)
📝 src/components/Dialog/PromptDialogBody.tsx (+1 -1)
📝 src/components/Dialog/styled.ts (+2 -2)
📝 src/components/GlobalStyle.tsx (+3 -3)
📝 src/components/Modal/contents/styled.ts (+2 -2)
📝 src/components/Modal/index.tsx (+3 -3)
📝 src/components/Modal/styled.ts (+2 -2)
📝 src/components/NotePage/NoteDetail/NoteDetail.tsx (+7 -7)
📝 src/components/NotePage/NoteDetail/TagList.tsx (+2 -2)
📝 src/components/NotePage/NoteList/NoteItem.tsx (+9 -9)
📝 src/components/NotePage/NoteList/NoteList.tsx (+5 -5)
📝 src/components/NotePage/NotePage.tsx (+9 -9)

...and 80 more files

📄 Description

I've used webpack alias before, and it helps to make importing cleaner, and more direct.
Here's the reference I've used before.

I've loaded the application and created a new folder, and a couple of notes. They store and are retrieved as expected.

There were no errors generated, apart from the missing-environment-variable warnings.

The benefit is, instead of referencing ../../lib/ or ../../../../../lib/, developers can simply reference Lib/.


The significant changes are in

  • tsconfig.json
  • webpack.config.ts

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BoostIO/BoostNote-App/pull/303 **Author:** [@shmolf](https://github.com/shmolf) **Created:** 1/18/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `lib-alias` --- ### 📝 Commits (1) - [`b3f92b9`](https://github.com/BoostIO/BoostNote-App/commit/b3f92b9f7ed9e14cabd6586952f69508cc1104d7) Webpack Alias: Added `Lib` alias ### 📊 Changes **110 files changed** (+272 additions, -262 deletions) <details> <summary>View changed files</summary> 📝 `src/components/App.tsx` (+14 -14) 📝 `src/components/AttachmentsPage/AttachmentList.tsx` (+6 -6) 📝 `src/components/AttachmentsPage/AttachmentsPage.tsx` (+5 -5) 📝 `src/components/CodeMirrorStyle.tsx` (+1 -1) 📝 `src/components/ContextMenu/ContextMenu.tsx` (+1 -1) 📝 `src/components/ContextMenu/styled.ts` (+3 -3) 📝 `src/components/Dialog/Dialog.tsx` (+2 -2) 📝 `src/components/Dialog/DialogIcon.tsx` (+1 -1) 📝 `src/components/Dialog/MessageBoxDialogBody.tsx` (+1 -1) 📝 `src/components/Dialog/PromptDialogBody.tsx` (+1 -1) 📝 `src/components/Dialog/styled.ts` (+2 -2) 📝 `src/components/GlobalStyle.tsx` (+3 -3) 📝 `src/components/Modal/contents/styled.ts` (+2 -2) 📝 `src/components/Modal/index.tsx` (+3 -3) 📝 `src/components/Modal/styled.ts` (+2 -2) 📝 `src/components/NotePage/NoteDetail/NoteDetail.tsx` (+7 -7) 📝 `src/components/NotePage/NoteDetail/TagList.tsx` (+2 -2) 📝 `src/components/NotePage/NoteList/NoteItem.tsx` (+9 -9) 📝 `src/components/NotePage/NoteList/NoteList.tsx` (+5 -5) 📝 `src/components/NotePage/NotePage.tsx` (+9 -9) _...and 80 more files_ </details> ### 📄 Description I've used webpack alias before, and it helps to make importing cleaner, and more direct. [Here's the reference](https://medium.com/@martin_hotell/type-safe-es2015-module-import-path-aliasing-with-webpack-typescript-and-jest-fe461347e010) I've used before. I've loaded the application and created a new folder, and a couple of notes. They store and are retrieved as expected. There were no errors generated, apart from the missing-environment-variable warnings. The benefit is, instead of referencing `../../lib/` or `../../../../../lib/`, developers can simply reference `Lib/`. --- The significant changes are in - `tsconfig.json` - `webpack.config.ts` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 00:22:53 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/BoostNote-App#718
No description provided.