-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
The react-typeahead-component dependency is breaking uglifyjs. It is able to build without errors, but in the browser, it causes a fatal runtime error preventing inbox-bundle.js from running.
I've traced this error back to react-typeahead-component/src/utils/get_text_direction.js, where it detects RTL languages using an enormous regex that includes Unicode characters.
I've tried including the babel-plugin-transform-es2015-unicode-regex plugin when transpiling from ES6 to ES5, but it doesn't seem to fix the issue.
Uncaught SyntaxError: Invalid regular expression: /^(?:[�-@[-`{-©«-´¶-¹»-¿×÷ʹʺ˂-ˏ˒-˟˥-˭˯-ͯʹ͵;΄΅·϶҃-҉֊֍-֏֑-ׇֽֿׁׂׅׄ-؇؉؊،؎-ًؚ-٬ٰۖ-ۤۧ-ۭ۰-۹ܑܰ-݊ަ-ް߫-߳߶-߹ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣ৲৳৻ਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣ૱ଁ଼ିୁ-ୄ୍ୖୢୣஂீ்௳-௺ఀా-ీె-ైొ-్ౕౖౢౣ౸-౾ಁ಼ೌ್ೢೣഁു-ൄ്ൢൣ්ි-ුූัิ-ฺ฿็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷-༽ཱ-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟᎐-᎙᐀ ᚛᚜ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៛៝៰-៹᠀-ᢩᤠ-ᤢᤧᤨᤲ᤹-᤻᥀᥄᥅᧞-᧿ᨘᨗᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᮫-ᮭ᯦ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷵᷼-᷿᾽᾿-῁῍-῏῝-῟῭-`´῾ -‐-
--⁰⁴-⁾₀-₎₠-₽⃐-⃰℀℁℃-℆℈℉℔№-℘℞-℣℥℧℩℮℺℻⅀-⅄⅊-⅍⅐-⅟↉←-⌵⍻-⎔⎖-⏺␀-␦⑀-⑊①-⒛⓪-⚫⚭-⟿⤀-⭳⭶-⮕⮘-⮹⮽-⯈⯊-⯑⳥-⳪⳯-⳱⳹-⳿⵿ⷠ-⹂⺀-⺙⺛-⻳⼀-⿕⿰-⿻ -〄〈-〠〪-〭〰〶〷〽-〿゙-゜゠・㇀-㇣㈝㈞㉐-㉟㉼-㉾㊱-㊿㋌-㋏㍷-㍺㏞㏟㏿䷀-䷿꒐-꓆꘍-꘏꙯-ꙿꚟ꛰꛱꜀-꜡ꞈꠂ꠆ꠋꠥꠦ꠨-꠫꠸꠹꡴-꡷꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱꨲꨵꨶꩃꩌꩼꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ﬩﴾﴿﷽︀-︙︠-︭︰-﹒﹔-﹦﹨-﹫!-@[-`{-・¢-₩│-○-�]|�[��-��-����-��-�]|�[��-����-��-�����-�]|�[�-�]|[��][��-��-��-��-����-��-��-�����-��-������-�����-��-�]|�[�-�������-������-�������-��]|�[�-��-�]|�[�-�]|�[���-�]|�[�-��-��-��-��-��-�]|�[������-�]|�[�-�]|�[��]|�[�-��-��-��-��-��-��-����-��-��-��-�]|�[�-��-��-��-��-��-��-��-��-��-�]|�[�-��-��-��-��-�])*(?:[־׀׃׆א-תװ-״؈؋؍؛؞-ي٭-ٯٱ-ەۥۦۮۯۺ-܍ܐܒ-ܯݍ-ޥޱ߀-ߪߴߵߺࠀ-ࠕࠚࠤࠨ࠰-࠾ࡀ-ࡘ࡞ࢠ-ࢲיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-﯁ﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-﷼ﹰ-ﹴﹶ-ﻼ]|�[�-���-�����-��-��-��-��-���-�����-��-��-��-��-��-��-��-��-��-��-��-��-��-�]|�[�-�]|�[�-��-�]|�[�-��-������-��-��������-�������������-��-��-��-���-��-��-��-��-�])/: Range out of order in character class
at RegExp (<anonymous>)
at Object.7../neutral_chars_regexp (inbox-bundle.js:1)
at i (inbox-bundle.js:1)
at inbox-bundle.js:1
at Object.<anonymous> (inbox-bundle.js:1)
at Object.5.../utils/get_text_direction (inbox-bundle.js:1)
at i (inbox-bundle.js:1)
at inbox-bundle.js:1
at Object.6../components/typeahead (inbox-bundle.js:1)
at i (inbox-bundle.js:1)
at inbox-bundle.js:1
at Object.614.../actions/InboxActions (inbox-bundle.js:1)
at i (inbox-bundle.js:1)
at inbox-bundle.js:1
at Object.611.../../../error (inbox-bundle.js:1)
at i (inbox-bundle.js:1)
at inbox-bundle.js:1
at Object.616.../../../flags (inbox-bundle.js:1)
at i (inbox-bundle.js:1)
at inbox-bundle.js:1
at Object.629.../../flags (inbox-bundle.js:1)
at i (inbox-bundle.js:1)
at e (inbox-bundle.js:1)
at inbox-bundle.js:1