With the dart interop js package I am struggling to find a way of using multiple js files (either with CommonJS or ES6 syntax). It appears that as soon as an import statement is used within an external js lib file, an error:
NoSuchMethodError: tried to call a non-function, such as null: 'dart.global.someJsMethod'
is thrown when calling any methods with the @JS() syntax. I have tried using webpack to generate a single js file, but the error remains.
Do I just accept this and manually merge into one js file to get rid of all import statements? Or am I missing some secret sauce in my dart references?