metarhia / jstp

Fast RPC for browser and Node.js based on TCP, WebSocket, and MDSF
https://metarhia.github.io/jstp
Other
142 stars 10 forks source link

build: tell Babel parser the correct source type #378

Closed aqrln closed 5 years ago

aqrln commented 5 years ago

Change the default "sourceType": "module" to the actual value of "sourceType": "script". This will prevent Babel from changing top-level this to undefined (fwiw), and, more importantly, make plugin-transform-runtime emit require statements instead of import statements.

Fixes: https://github.com/metarhia/jstp/issues/377

belochub commented 5 years ago

Landed in https://github.com/metarhia/jstp/commit/94870c068e620782851a071784853e18717cd275.