私は使用していますember-cli 0.0.33
を使用してデフォルトアプリを作成しました
ember new stealth
それから私はそれを使用して構築しました
ember build --environment=production
index
次に、ファイルをにhttps://d1mungh8jer63d.cloudfront.net/index.html
アップロードし、 URLを開き、両方に空白の白い画面が表示されました。asset
../assets/*
index
Chrome
Firefox
次に、何も変えずに走りました
ember s --environment=production --live-reload=false
これにより、まったく同じdist
ファイルが得られます。ブラウザを開いたところlocalhost:4200
、ページにはWelcome to Ember.js
.
しかし、両方とも同じソースindex.html
を持っています:localhost:4200
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Stealth</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="/" />
<link rel="stylesheet" href="https://d1mungh8jer63d.cloudfront.net/assets/vendor-d41d8cd98f00b204e9800998ecf8427e.css">
<link rel="stylesheet" href="https://d1mungh8jer63d.cloudfront.net/assets/stealth-de3c495d5da3bffcdc865aaa60f76ab3.css">
</head>
<body>
<script>
window.StealthENV = {"baseURL":"/","locationType":"auto","EmberENV":{"FEATURES":{}},"APP":{}};
window.EmberENV = window.StealthENV.EmberENV;
</script>
<script src="https://d1mungh8jer63d.cloudfront.net/assets/vendor-5429f75166356b28c3e42dd401abaf36.js"></script>
<script src="https://d1mungh8jer63d.cloudfront.net/assets/stealth-271c63d147abd689113e3c0bae25a9e5.js"></script>
<script>
window.Stealth = require('stealth/app')['default'].create(StealthENV.APP);
</script>
</body>
</html>
1 つが "work"/displayWelcome to Ember.js
であるのに、もう 1 つが空白の白い画面を表示したのはなぜですか? そして、どのようにindex.html
「仕事」をするのですか?