I am building a client/server app in Dart using Angular for the front-end and Shelf on the backend. When I do a
<script type="application/dart" src="main.dart"></script>
This makes my application not load correctly. If I manually change it to
My application works as expected. My question is, is there a way to configure my pub build to do this automatically? Or are dart files references not supposed to be replaced with JS references? If so, how do I build a basic server?
I know this produces an error message in the browser console but never experienced any problems because of this.
I haven’t used it myself yet but I think this transformer https://pub.dartlang.org/packages/dart_to_js_script_rewriter does what you want.
Answered By – Günter Zöchbauer
Answer Checked By – Mildred Charles (FlutterFixes Admin)