Open stephanedemotte opened 6 years ago
Hm, I could swear that this has been iced before.
Maybe some merge or rebase screwed it up again.
Will fix it.
If you need to fix it yourself quickly, just change the alias from '@' to '@/'
Hm that doesn't work - why? I swear that worked before. Jesus ...
Will look at this again tommorrow.
It seems we may have to switch to some other alias. I've seen ~
being used in nuxt, but that also has a special meaning in e.g. sass-loader: @import(~bootrap.scss)
We could simply use @@
.... looks funny but not that much worse than a single @
Re-classifying as an enhancement, more fitting imho.
+1 for changing the alias.
@
conflicts with NPM orgs/teams and can be confusing when using both the @/
alias and NPM orgs/teams.
~
is confusing since it means the users home directory on unix machines.
What does that leave us with that's easy to type on all major international keyboards? There's also the question of whether to include the /
.
@@
or @@/
— actually not that bad#
or #/
$
or $/
%
or %/
^
or ^/
*
or */
— a bit hard to see in some fonts+
or +/
=
or =/
|
or |/
— not sure this is easy to type on some international keyboards:
or :/
;
or ;/
?
or ?/
//
\
or \/
— kind of confusingThanks for the feedback, that's a great list of possible replacements.
Personally like $ or #, but I'm afraid t least $ could be problematic because it's used as a special chat in aliases, defining the end of the require string.
I'll play a bit wirh both to check for limitations, and ask everyone who's interested to do the same.
+1 for #
I think we will indeed go with #
- I've tested it a bit and it seems to work fine in all scenarios.
Why not simply go with src
?
Because there might be packages whose name starts with src
.
#
or ##
would be pretty great now that I think about it. I can't think of any conflicts other than looking similar to an internal target location in a href link, but that shouldn't be an issue with webpack imports (right?).
#
is short and sweet, ##
feels a lot more explicit and may be a good option for better clarity. I'm happy with either being the default.
Conflict with alias
@
with some packages like the new font awesome 5vue-fontawesome bug report