I ask myself if it is possible to split up a single dart.js into multiple files. I just seek a possibility to convert several independent used JavaScript components in something that is as reusable but yet independently used Dart equivalents.
1 Answer
You can have a look at DeferredLibrary and the issue Enable dart2js to split output into N files to reduce initial download size (WARNING : the issue is not yet fixed).
2 Comments
Greg Lowe
I don't think the N bit is implemented yet - can only split into 2 files at the moment. Perhaps make that more clear in your answer.
Martin Kersten
I want to wait until the better integration with JavaScript hits the road. I sometimes wonder why there is no easy way to split the code in multiple files that compile to JavaScript but actually work like Jars. Maybe its the threading model... .