在订购游戏的pubspec.yaml上使用Pub Build - Minified之后,游戏的主板不会出现在Chrome中

时间:2015-04-15 14:13:40

标签: dart dart-pub dart2js

dart2js问题

order游戏的pubspec.yaml上使用Pub Build - Minified后, 游戏的主板不会出现在Chrome中。

boarding包使用枚举和mixins。

pubspec.yaml:

name: order
version: 0.2.7
author: Dzenan Ridjanovic <dzenanr@gmail.com>
description: An example from boarding.
homepage: https://github.com/dzenanr/boarding
environment:
  sdk: '>=1.0.0 <2.0.0'
documentation: http://goo.gl/kXlDOJ
dependencies:
  boarding: any
  browser: any
transformers:
- $dart2js:
    minify: true
    terse: true
    commandLineOptions: [--enable-enum]

Loading source assets...
Building order...
[Info from Dart2JS]:
Compiling order|web/index.dart...
[Info from Dart2JS]:
Took 0:00:10.139580 to compile order|web/index.dart.
Built 7 files to "build".

Dart编辑器和Chrome都没有错误。

1 个答案:

答案 0 :(得分:1)

index.dart

中的index.html脚本标记下方添加此行
<script src="packages/browser/dart.js"></script>