Use `~` as the webpack alias for CE and EE javascripts folders
Problem to solve
Use a clear, concise alias to eliminate line changes when a file exists in both CE and EE.
Further details
@mikegreiling has been leading the charge for a new webpack alias which will resolve to /app/assets/javascripts
in CE and /ee/app/assets/javascripts/
in EE. ~
is our current alias for the CE javascripts
folder so executing this particular proposal would likely mean changing a large amount of our existing import
statements.
Proposal
Use ~
as the dynamically resolved alias as it is already a widely recognized unix shortcut signifying the home directory.
In GitLab CE ~
would resolve to /app/assets/javascripts
whereas in EE it would resolve to /ee/app/assets/javascripts/
. Another issue would likely need to be created in CE for changing the existing ~
implementation over to something like ce
. The end result would be as follows:
-
ce
always resolves to/app/assets/javascripts
-
ee
resolves to/ee/app/assets/javascripts/
in EE -
~
resolves to/app/assets/javascripts
in CE and to/ee/app/assets/javascripts/
in EE