Skip to content

Commit 148a75c

Browse files
author
Robert Jackson
committed
Evaluate dist files upon new FastBoot
This helps ensure that if the dist files themselves are invalid, we fail fast (e.g. before the first `fastboot.visit()` invocation).
1 parent ec2b32d commit 148a75c

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/ember-app.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ class EmberApp {
6565
config.appFiles
6666
);
6767
this.scripts = buildScripts(filePaths);
68+
69+
// Ensure that the dist files can be evaluated and the `Ember.Application`
70+
// instance created.
71+
this.buildApp();
6872
}
6973

7074
/**
@@ -192,7 +196,7 @@ class EmberApp {
192196
*
193197
* @returns {Ember.Application} instance
194198
*/
195-
async buildApp() {
199+
buildApp() {
196200
let sandbox = this.buildSandbox();
197201

198202
debug('adding files to sandbox');
@@ -221,8 +225,6 @@ class EmberApp {
221225
// Otherwise, return a new `Ember.Application` instance
222226
let app = AppFactory['default']();
223227

224-
await app.boot();
225-
226228
return app;
227229
}
228230

@@ -248,6 +250,8 @@ class EmberApp {
248250
let app = await this.buildApp();
249251
result.applicationInstance = app;
250252

253+
await app.boot();
254+
251255
let instance = await app.buildInstance();
252256
result.applicationInstanceInstance = instance;
253257

0 commit comments

Comments
 (0)