I would like to use d3.js for showing graphs in my apache cordova app. To avoid unnecessary traffic there is a local d3.min.js file loaded via
<script src="js/d3.min.js"></script>
However I got the javascript error while starting the app in the android emulator
Android API-Level 22 (Android 5.1)
Uncaught SyntaxError: Unexpected strict mode reserved word @d3.min.js:2
Android API-Level 23 (Android 6)
Uncaught SyntaxError: Unexpected token => @ d3.js:19
There is no "use strict" in my code. To verify the issue I created a bare cordova project, included d3.js with the code above and got the same error.
Any idears on how to load d3.js without using strict mode in cordova?
I am using
d3.js 6.3.0
Android Studio 4.1.1
Cordova 10.0.0
with
"cordova-android": "^9.0.0",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-splashscreen": "^6.0.0",
"cordova-plugin-whitelist": "^1.3.4"