Dartium (Dart VM) で動作し、Polymer 0.10.0-pre.12 まで動作する Polymer 0.10+ Web アプリがあります。
それを JS (Pub Build) にコンパイルし、Google Chrome で JS として実行すると、ポリマー (大きな) コンポーネントが表示されず、コンソールに次のメッセージが表示されます。
「リソースはスクリプトとして解釈されますが、MIME タイプ application/dart で転送されます: "127.0.0.1:8080/cvwebkit.html_bootstrap.dart". cvwebkit.html:295」
295行目:<script type="application/dart" src="cvwebkit.html_bootstrap.dart"></script></body></html>
この行を<script src="cvwebkit.html_bootstrap.dart.js"></script></body></html>
ビルド ディレクトリの cvwebkit.html に変更すると、機能します。
変更したファイルを直接起動すると、この URL が表示され、(少なくとも部分的に) 動作します 127.0.0.1:3030/CVWebkit/WebApp/build/web/cvwebkit.html
通常、「dev」ファイルを JS として起動すると、次の URL で上記の問題が発生します: 127.0.0.1:8080/cvwebkit.html
私の頭" :
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CVWebKit</title>
<link rel="stylesheet" href="cvwebkit.css">
<link rel="import" href="packages/polymer/polymer.html">
<link rel="import" href="imgdyn.html"> <!--to ensure dynamic assets are created by polymer, so that there is no attempt first by the browser-->
<link rel="import" href="cvwebkitscript.html"> <!--needed to include the link to the dart script as we can't use both "src" and "export" in the script line-->
<link rel="import" href="zone-ruban.html">
<script type="application/dart">export 'package:polymer/init.dart';</script>
</head>
何か案が ?