I have several files that I wrote in a dart that I want to compile in javascript and include in several html files that work in my Android application.
Files consist of the main method, then there is an api layer with 3 functions that will be called by javascript code at runtime. It is very important that I include as few dart libraries as possible (so tree shake is required), and when the tree shake / minimize process occurs, I need to make sure that the level 3 api functions do not get renamed / optimized because they think that they are not called?
How to tell dart2js to leave the signature of only certain functions, and not to cut them off, because it thinks they are not used?
source
share