I'm running a java application build and I'm getting the following error when building the application:
line 33:column 10:syntax error
import(dataUri);
[ERROR] file.js:line 1:column 0:Compilation produced 1 syntax errors.
The actual code:
const encodedJs = encodeURIComponent(evalScript);
const dataUri = 'data:text/javascript;charset=utf-8,'
+ encodedJs;
import(dataUri);
I'm trying to get a JS module integrated into our appplication, but it looks to me like (for some reason), the compiler doesn't recognize the import statement?
Any idea how to resolve this?