CUCentralAdvancement / cms

The Central Advancement Content Management System
MIT License
0 stars 0 forks source link

Import Statements At Root #9

Closed alexfinnarn closed 3 years ago

alexfinnarn commented 3 years ago

It is a huge PITA to use relative imports. You can add root imports with the @ symbol, but it takes some setup.

References:

Required

What area of the codebase does this involve?

This touches everything.

Acceptance Criteria

or

alexfinnarn commented 3 years ago

Changing all imports actually is a PITA too. If you're importing code from the same directory, and that will likely not change, then why add directory prefixes to that import statement? So, I left a few relative imports.

alexfinnarn commented 3 years ago

This did not work with yarn build and I'm not sure how it worked with yarn dev. I think TypeScript complicates the root import, but there are like four config files involved in the whole mess now...and a few dependencies that can be removed if root imports are too much of a PITA to quickly implement.