Webpack Alias: Added Lib alias#303
Webpack Alias: Added Lib alias#303shmolf wants to merge 1 commit intoBoostIO:masterfrom shmolf:lib-alias
Lib alias#303Conversation
|
@shmolf Thanks for submitting this PR. I like the idea. But, sadly, I should close this issue for now because I'm working on huge refactoring. But we'll be back to this issue one day after the app's code base becomes stable enough. |
|
Sounds appropriate. Once it's stable enough, I can pull a fresh master copy, and re-implement. Thanks for the update. |
|
@Rokt33r I know you were doing some refactoring. Mind if I create some alias, without changing any files to use them? In this way, new files can reference the alias, and later, when the codebase slows down, I can refactor what remains |
|
@shmolf I still want to wait until I really need this. I still can do refactor to make module structure simpler. But I'll definitely introduce the module alias when I feel I can do improve any better without it. |
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 referenceLib/.The significant changes are in
tsconfig.jsonwebpack.config.ts