Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with alias @ #1239

Open
stephanedemotte opened this issue Jan 10, 2018 · 12 comments
Open

Conflict with alias @ #1239

stephanedemotte opened this issue Jan 10, 2018 · 12 comments

Comments

@stephanedemotte
Copy link

stephanedemotte commented Jan 10, 2018

Conflict with alias @ with some packages like the new font awesome 5

vue-fontawesome bug report

@LinusBorg
Copy link
Contributor

Hm, I could swear that this has been iced before.

Maybe some merge or rebase screwed it up again.

Will fix it.

@LinusBorg LinusBorg self-assigned this Jan 10, 2018
@LinusBorg LinusBorg added the bug label Jan 10, 2018
@LinusBorg
Copy link
Contributor

If you need to fix it yourself quickly, just change the alias from '@' to '@/'

@LinusBorg LinusBorg reopened this Jan 10, 2018
@LinusBorg
Copy link
Contributor

Hm that doesn't work - why? I swear that worked before. Jesus ...

Will look at this again tommorrow.

@LinusBorg LinusBorg reopened this Jan 10, 2018
@LinusBorg
Copy link
Contributor

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 @

@LinusBorg
Copy link
Contributor

Re-classifying as an enhancement, more fitting imho.

LinusBorg added a commit that referenced this issue Jan 13, 2018
* develop:
  bump template version (1.3.0)
  chore: remove extra comma (#1240)
  Improve template CI tests (close #1218)
  Revert "fix bad alias (fix #1239)"
  Typo, whitespace and Style Guide fixes (#1231)
  Update runner.js (#1235)
  remove unnecessary option.
  bumping eslint dependencies
  fix bad alias (fix #1239)
  remove duplicate lines in gitignore (#1214)
  fix historyFallback rewrite for Windows systems
  improved comments in eslintrc
  updated linting docs.
  respect eslint rule for order of options.
  switch to essential ruleset.
  add eslint-plugin-vue

# Conflicts:
#	template/build/build.js
@maxmilton
Copy link

maxmilton commented Jan 14, 2018

+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 ?/ — may conflict with webpack inline loaders
  • // — means protocol relative url
  • \ or \/ — kind of confusing

@LinusBorg
Copy link
Contributor

Thanks 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.

@stephanedemotte
Copy link
Author

+1 for #

c0defre4k pushed a commit to neonblack-at/webpack that referenced this issue Jan 23, 2018
* vuejs-templates/master: (66 commits)
  Bump template version (1.3.1)
  change circleci node image to 6.12.3 to ensure node 6 compat.
  replace object rest spread with Object.assign for node6 compat. (fix
vuejs-templates#1245)
  bump template version (1.3.0)
  chore: remove extra comma (vuejs-templates#1240)
  Improve template CI tests (close vuejs-templates#1218)
  Revert "fix bad alias (fix vuejs-templates#1239)"
  Typo, whitespace and Style Guide fixes (vuejs-templates#1231)
  Update runner.js (vuejs-templates#1235)
  remove unnecessary option.
  bumping eslint dependencies
  fix bad alias (fix vuejs-templates#1239)
  fix history fallback for windows.
  remove duplicate lines in gitignore (vuejs-templates#1214)
  fix historyFallback rewrite for Windows systems
  improved comments in eslintrc
  updated linting docs.
  respect eslint rule for order of options.
  switch to essential ruleset.
  add eslint-plugin-vue
  ...

# Conflicts:
#	meta.js
#	template/package.json
#	template/src/components/HelloWorld.vue
#	template/src/main.js
@LinusBorg
Copy link
Contributor

I think we will indeed go with # - I've tested it a bit and it seems to work fine in all scenarios.

@PierBover
Copy link

Why not simply go with src?

@LinusBorg
Copy link
Contributor

Because there might be packages whose name starts with src.

@maxmilton
Copy link

# 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.

@LinusBorg LinusBorg removed their assignment Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
@PierBover @LinusBorg @stephanedemotte @maxmilton and others