alias-hq: Breaks the development process

If there are not paths recognized, this package breaks the development workflow.

IMO, the paths should be console logged and not throw error if empty. Empty paths object or no paths object should still be valid configuration

https://github.com/davestewart/alias-hq/blob/master/src/index.js#L68

throw new Error('The loaded paths appear to be empty')

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

Fixed in 3.x

Am also going to publish working demos for each platform (vue, react, etc) I think.

It looks like this “base” tsconfig thing is supported for various environments anyway:

Therefore, considering adding code which looks for, loads, and checks for compilerOptions.paths in turn for:

[
  'jsconfig.json',
  'tsconfig.base.json',
  'tsconfig.json',
]

That would mean you could go back to just:

aliases.get('webpack')

Thoughts?

Hmm… did you google that error?

There’s a comment which seems to describe a fix:

Is this relevant to your issue? Can you check and report back?

If so, perhaps I can update the docs to help future travellers.

Thanks 😃

Thought about this, and I think you’re right.

Say someone wanted to set a project up in advance, and have the end user add aliases when they were ready?

I’ll get this implemented with the next minor release.

Thanks for raising it!