1

I am very new to Dart so bear with me. I completed the sample pirate badge project and did Pub Build - Minified as instructed. The generated build folder does not contain the packages/browser/dart.js and priatebadge.dart files that are referenced by piratebadge.html.

When I view in the browser there are errors related to those missing files. If I change the html page to reference the generated piratebadge.dart.js file it works.

Is this manual change something that has to be done with dart projects? or am I missing something in the build process?

1 Answer 1

1

At first, ensure you build in release mode. (default if you run pub build from command line.

I haven't checked for a while but I assume there is still this Dart script tag which was introduced when it was still planned to integrate Dart into Chrome. This will hopefully fixed soon. In the meantime you can fix this manually or use https://pub.dartlang.org/packages/dart_to_js_script_rewriter to automate this step.

1
  • 1
    I was running in release mode. Adding the transformer fixed it. Jun 4, 2015 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.