1

First things first: target/host env is quite rare and weird at same time, so I am OK if this ends with nothing. Pls excuse me in advance for time you might spent on it.

A plot: my friend and I come up with a "plugin" (JS code) for some win32 app to process previously recorded analog signal from injector(s) of you car to analyze it and find (best) approaches for driving your car (max speed (real vs stock), max RPM, max fuel consumption, RPM with best consumption, etc). I wrote it several years ago (based on knowledge/experience I had at that time. Means script was written with help of tech stack ~10y ago). Because of the env I ended with own implementations of logger, profiler, i18n engine, etc.

Platform: its a win32 app (quite old, ~MSWinXP) which is able to process recorded data with plugins. I pretty much sure it does not support anything except es3 (no, 'map', 'reduce', 'forEach', etc). For everyone interested in playing with it there will be a link to it.

My target: JS -> TS, grunt -> webpack, build inclusion order -> ES modules (import/export), home cooked modules -> NPM alternatives and so on..

Actual task: I am trying to import core-js package to fullfill missed stuff and faced with issue that https://github.com/zloirock/core-js/blob/master/packages/core-js/internals/global.js is not able to properly detect/find global object.

That file bring me to next links:

I believe I tried all suggestion (https://gist.github.com/ZuBB/017c40f4d68396428458660e6604f765) from those links but that does not help - https://drive.google.com/open?id=1XdQpryaOsJ2CFdF0Qh5c1u6GvPkJAIAl.

I would be grateful for any ideas how to get the reference to global object

gist with platform-related links: https://gist.github.com/ZuBB/7e3e76c7629518671e209148fc0d2b6a

Bergi
  • 630,263
  • 148
  • 957
  • 1,375
ZuBB
  • 124
  • 2
  • 8
  • You should have linked https://injectorservice.com.ua/oscilloscope.php directly. It mentions "VBScript/JScript", which are definitely relevant keywords as well – Bergi Apr 27 '20 at 13:39
  • I'm pretty certain that js-core won't be able to polyfill many things - most functionality will require native ES5 at least. So you're probably better off ignoring the global object, and just importing the individual polyfills that you need and of which you know that they will work. – Bergi Apr 27 '20 at 13:44

0 Answers0