The Hexblade warlock's Hex Warrior feature specifies you can use Charisma for attack and damage with any non two-handed property weapon, which would eliminate longbows. But would taking the Improved Pact Weapon eldritch invocation allow for longbow?
Hex Warrior works with any Pact Weapon
The final part of the Hex Warrior feature states:
[...] If you later gain the Pact of the Blade feature, this benefit extends to every pact weapon you conjure with that feature, no matter the weapon's type.
Notably, it says that you gain its benefits to every pact weapon, regardless of its type. Unfortunately, the rules do not actually define "weapon type" so we are left using the standard English definition of "type":
A category of people or things having common characteristics.
So a weapon's type is its categories. Within the books weapons have a few categories but I believe "type" here means weapon names such as "Javelins" or "Shortswords". Using this idea, we would conclude that Hex Warrior applies to any and all Pact Weapons regardless of anything else.
Unfortunately, that definition of "type" isn't truly supported, but perhaps related to that definition is the Kensei Weapons feature, which states:
Chose two types of weapons to be your kensei weapons: one melee weapon and one ranged weapon. Each of these weapons can be any simple or martial weapon that lacks the heavy and special properties. The longbow is also a valid choice.
Note it says to choose two types of weapons. Though it doesn't explicitly say "Javelins" or anything similar is considered a type of weapon, I've never seen this featured ruled any other way at a table. This could support how the word "type" is used in the Hex Warrior feathre but it ultimately isn't truly evidence because the rules use natural language and so words and phrases don't always have a consistent meaning, especially not terms used seemingly only twice and in two utterly different sections of the rules.
Yes, any Pact Weapon can benefit from Hex Warrior.
The Hex Warrior feature states the following for using it for any Hexblade warlock:
Whenever you finish a long rest, you can touch one weapon that you are proficient with and that lacks the two-handed property.
However, it later states (emphasis mine):
If you later gain the Pact of the Blade feature, this benefit extends to every pact weapon you conjure with that feature, no matter the weapon's type.
Since the Improved Pact Weapon invocation was released in the same sourcebook, I assume it is intentional for Hex Warrior to work on two-handed weapons as long as they are Pact Weapons.