This is a point of significant contention. It would be inaccurate to claim that there exists consensus among scholars, Jews, or even, occasionally, within individual sources. To provide an idea of the controversy, the English Wikipedia has the following definition:
The Holocaust, also known as the Shoah, was the World War II genocide
of the European Jews. Between 1941 and 1945, across German-occupied
Europe, Nazi Germany and its collaborators systematically murdered
some six million Jews, around two-thirds of Europe's Jewish
population.
But on the other hand, Wikipedia also has the page Holocaust victims, with a much more inclusive listing: effectively, so far as I can tell, everyone killed outside of combat by the Nazi party, as long as said victim was not ethnically “Aryan” as defined by Nazi racial codes, even including prisoners of war!
This same controversy can be seen on the website of the United States Holocaust Memorial Museum, where the encyclopedia says:
The Holocaust was the systematic, state-sponsored persecution and
murder of six million Jews by the Nazi regime and its allies and
collaborators. Holocaust is a word of Greek origin meaning "sacrifice
by fire."
However, the animated encyclopedia uses a broader definition:
The Holocaust was the murder of six million Jews and millions of
others by the Nazis and their collaborators during World War II. Mass
killings began in June 1941 with the shooting of Jewish civilians
during the German invasion of the Soviet Union. At the end of 1941,
the Germans began deporting Jews to killing centers in occupied
Poland. By May 1945, about two out of every three Jews in Europe had
been murdered.
Restrictive definitions
A number of scholars have argued against the broader definition on moral and practical terms. As noted on Wikipedia:
Michael Gray, a specialist in Holocaust education, offers three
definitions: (a) "the persecution and murder of Jews by the Nazis and
their collaborators between 1933 and 1945", which views Kristallnacht
in 1938 as an early phase of the Holocaust; (b) "the systematic mass
murder of the Jews by the Nazi regime and its collaborators between
1941 and 1945", which recognises the policy shift in 1941 toward
extermination; and (c) "the persecution and murder of various groups
by the Nazi regime and its collaborators between 1933 and 1945", which
includes all the Nazis' victims, a definition that fails, Gray writes,
to acknowledge that only the Jews were singled out for
annihilation.
Indeed, while many groups were targeted by the Nazi party, anti-Semitism is what principally drove its leader, Hitler. As he himself stated in a letter long before the actual execution of the Holocaust:
Antisemitism based on purely emotional grounds will always find its
ultimate expression in the form of pogroms. A rational antisemitism,
however, must lead to the systematic legal fight against and the
elimination of the prerogatives of the Jew. ... Its ultimate goal,
however, must unalterably be the elimination of the Jews altogether.
It is also heavily present in Mein Kampf:
Was there any form of filth or profligacy, particularly in cultural
life, without at least one Jew involved in it?
Mein Kampf
This hatred of Jews certainly has no parallel in Hitler's attitudes toward other groups disfavored by the Nazi Party, which so far as I can tell are not even mentioned in the work.
Some commentators also express concern that this definition will intentionally be used to minimize or dismiss the genocide of Jews. In particular, far-right parties in a variety of European nations, such as Slovakia, use the fact that many Slavs were also killed by the Nazis to deny the complicity of the wartime governments of their own countries in the Holocaust. Quoth the Independent, with regard to Poland:
Researchers Lindsay Daugherty and Jeremy Epstein contextualise Polish
national negativity in their chapter of last year’s Holocaust
Remembrance Project report: “Poland’s historic understanding of itself
as the ‘Jesus of the Nations’, a deeply religious country which has
suffered for too long under the might of its powerful neighbours,”
they write, “renders its status as a country of victims, rather than
oppressors, core to its self-understanding.”
This has led to what they call a kind of “competitive victimisation”
with Polish Jews. In Poland’s retelling of the Holocaust, the number
of Poles who died is often cited as six million. Coincidentally it’s
the same as the number of European Jews who perished as well. It’s a
competition that has, ironically, generated a new wave of Polish
antisemitism.
This is largely why I am highly skeptical of the motives behind these types of questions. There are many people who use such arguments to suggest that Jews exaggerate the Holocaust, and that it really was not specifically targeted at Jews in any way, shape, or form. The ultimate goal of such rhetoric is frequently to assert that anti-Semitism played no role in the Holocaust, or that such-and-such country is blameless.
Then there are those who fear that this definition might be used to deemphasize the killing of Jews in other ways. For instance, in Holocaust Memory and Antisemitism in Slovakia: The Postwar Era to the Present, Nina Paulovičová notes:
Communists tailored the Holocaust into a class paradigm to condemn the
bourgeoisie and highlight the suffering, victimhood, and heroism of
the proletariat.
Expansive definitions
However, there also exist arguments for the more inclusive definition. First, and most basically, the term Holocaust, as used in the context of genocide, was not created specifically to describe the genocide of Jews at the hands of the Nazi Party, but rather the genocide of Armenians. If it was acceptable to adopt the term to refer to a separate genocide, one might argue that it would be logical to apply it to other genocides carried out by precisely the same group during the same time period.
Further, as Wikipedia notes again, some researchers have drawn attention to the intrinsic ideological and practical similarity between Nazi extermination of Jews, and similar campaigns carried out against groups such as Romani and people with disabilities:
Donald Niewyk and Francis Nicosia, in The Columbia Guide to the
Holocaust (2000), favor a definition that focuses on the Jews, Roma
and handicapped: "the systematic, state-sponsored murder of entire
groups determined by heredity."
This view and similar opinions rest in part on the fact that while Jews were certainly the most hated group in the Nazi racial and social hierarchy, the fact is that this hierarchy existed, and was viewed as a consistent and inseparable whole by devoted members of the Nazi Party, with the ultimate goal being the growth, exaltation, and supremacy of the so-called Aryan race. Thus, rather than simply viewing their efforts as a number of disconnected genocides and persecutions—the Shoah, the Porajmos (one term used for the genocide of Romani), and so forth—it might be more logical to view the whole Holocaust as part of an ongoing plan to purge German territories and even German DNA of any factors considered inferior by this ideology, using the methods that were deemed appropriate to the group’s perceived threat according to Nazi politics and racist “science.” After, it was not only Hitler—whose hatred of Jews certainly far outstripped his antipathy toward any other group—who carried out the Holocaust, but people like Himmler and even rank-and-file party members. The philosophies that motivated their actions cannot easily be discounted.
In the case of Jews and Romani, the measures were harshest. As indicated on Wikipedia, Romani were quickly considered to be incompatible with the German nation, much as Jews had been classified from the outset. It is worth noting, of course, that the Nazi Party and Hitler considered Jews to be more dangerous and more of a priority than the Romani. However, while other groups may have been much less of a priority, they were not spared.
For instance, while some have emphasized that far fewer gay men were killed by the Nazis relative to Jews, both in terms of absolute numbers and percentages, the rhetoric of many Nazi leaders in that regard shows ominous similarities. For instance, in a speech that Himmler, the architect of the “Final Solution to the Jewish Problem,” gave to the SS on February 18, 1937, he emphasizes that purging homosexuality is right and necessary for the survival of the Aryan race. In the translation of the Jewish Virtual Library:
I wish to explore a few ideas on the subject of homosexuality. Amongst
certain homosexuals there exists the following point of view: "what I
do is of no importance to anyone else, it is a personal and private
matter." Everything which touches upon sexual matters ceases to be
private when the life or death of a nation depends on it. It is the
difference between world domination or annihilation ... A nation with
many children can gain supremacy and mastery of the world. A pure race
with few children already as one foot in the grave; in fifty or a
hundred years it will be of no significance; in two hundred years it
will be extinct. It is essential to realise that if we allow this
infection to continue in Germany without being able to fight it, it
will be the end of Germany, of the Germanic world. Unfortunately this
is not the simple matter it was for our forefathers. For them, the few
isolated cases were simply abnormalities; they drowned them in bogs.
Those who found bodies in the mire did not know that in 90% of the
cases they found themselves face to face with a homosexual who had
been drowned with all his belongings. This was not punishment, more
the simple elimination of this particular abnormality. It is vital we
rid ourselves of them; like weeds we must pull them up, throw them on
the fire and burn them. This is not out of a spirit of vengeance, but
of necessity; these creatures must be exterminated.
Himmler was much quieter about his plans for Slavic peoples, but he absolutely wanted to get rid of them:
Within a very few years—I should think about 4 to 5 years—the name
of the Cashubes, for instance, must be unknown, because at that time
there won’t be a Cashubian people any more (this also goes especially
for the West Prussians). I hope that the concepts of Jews will be
completely extinguished through the possibility of a large emigration
of all Jews to Africa or some other colony. Within a somewhat longer
period, it should also be possible to make the ethnic concepts of
Ukrainians, Gorals, and Lemcos disappear in our area. What has been
said for those fragments of peoples is also meant on a correspondingly
larger scale for the Poles.
Of course, it is worth noting that in the surrounding text, Himmler talks about expulsion and education as his means of eliminating ethnic identity among Slavic groups, but he also says the same about Jews, and within two years he decided that the “Final Solution” to their presence was nothing less than extermination in all German-controlled territories.
Mark Mazower also notes that Himmler said:
Our mission is not to Germanise the East in the old sense -bringing
the German language and laws to those living there- but rather to
ensure that in the East dwell only men with truly German, Germanic
blood.
I could not find the quote there, but it could be a matter of a different translation.
Himmler also said that:
All Polish specialists will be exploited in our military-industrial
complex. Later, all Poles will disappear from this world. It is
imperative that the great German nation consider the elimination of
all Polish people as its chief task.
As shown previously, Himmler often connected his plans for extermination of Jews and extermination of other groups that he saw as inferior, as also illustrated here:
It is a question of existence, thus it will be a racial struggle of
pitiless severity, in the course of which 20 to 30 million Slavs and
Jews will perish through military actions and crises of food supply.
In practice, of course, ethnic non-Jewish Slavs were considered superior to Jews, and were not targeted to nearly the same extent. Many of them were eligible for forced Germanization, and they were never completely destroyed as contemplated in the Generalplan Ost. Yet in light of these statements, it clear enough that by any modern standard, Himmler had a genocidal, exterminatory intent with regard to some un-Germanizable portion of ethnically Slavic countries, and some fraction of the some 4 million non-Jewish Slavs who were killed during the Nazi occupation can easily be viewed through that lens. Of course, this did not stop many collaborators in these countries, especially Poland, from participating in and abetting the genocide of the Jewish population.
In short, one argument for an expansive definition of the Holocaust is that the Nazi Party, and particularly the man who organized and designed the Holocaust of Jews, clearly had plans to eliminate the “racial impurities” of homosexuality, disability, Romani descent, and Slavicness by any means necessary, up to and including death, and that to a significant extent he carried out those plans, killing some hundreds of thousands of Romani and disabled people, some millions of Slavs, and some thousands of gay men. Far from being completely separate from the extermination of Jews, these formed part of a “coherent” ideology, particularly in the mind of Himmler. To these categories one might also add Black Germans (much more accepted than these other groups at the time, but subject to a program of selective abortion and sterilization) and Jehovah’s Witnesses (not targeted for explicitly racist reasons, but targeted for elimination or imprisonment nonetheless, and religion tends to be de facto hereditary).
As a side point, one counterargument to the assertion that including other groups in the Holocaust will erase the Jewish Holocaust from history is that not including these groups in the Holocaust may carry a similar risk. Even if separate words are used (or invented) for the persecution and murder of these groups, terms like Porajmos, which refers specifically to the Holocaust of Romani, are much less well-known, or even a tad controversial in their own right, which may make it much less likely that people will learn about Nazi actions towards them if they are not included in the definition of the Holocaust.
Summary
There are a variety of definitions of the Holocaust discussed by non-denialist scholars. Some definitions are so expansive that they include even the deaths of Spanish Republicans and Soviet prisoners of war, whereas others are restrictive enough as to include only Jews, or even more narrow, such as excluding Kristalnacht. Those who advocate for the more restrictive terminology point out the special hatred of Nazis for Jews, and the particular extent to which they were targeted and marked for destruction compared to other groups persecuted by the Nazi party. Those who advocate for a broader definition generally draw attention to commonalities and continuity in the Nazi persecution of Jews and non-Jewish groups.