From 01c1f3b1c3828b795550ee4c9e297d30a95416bb Mon Sep 17 00:00:00 2001 From: Ryunosuke Sato Date: Fri, 23 Jun 2017 21:39:01 +0900 Subject: [PATCH] Fix global build The global build of ember-data has been broken since https://github.com/emberjs/data/pull/4823. When `ember-data.js is loaded, the following error is occured: ``` Uncaught Error: Could not find module `ember-data/index` imported from `ember-data/initializers/ember-data` ``` A reproduction code is just simple: ```

Hello, Ember!

``` The reason of this error is that the broccoli builds the module named "*/index" into `*` for global build. But loader.js couldn't resolve `ember-data/index` as `ember-data`. So the `ember-data/index` module should be to as just `ember-data` to be compatible with NPM package and global. --- app/initializers/ember-data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/initializers/ember-data.js b/app/initializers/ember-data.js index 2694ebad115..ba03dbbc552 100644 --- a/app/initializers/ember-data.js +++ b/app/initializers/ember-data.js @@ -1,5 +1,5 @@ import setupContainer from 'ember-data/setup-container'; -import 'ember-data/index'; +import 'ember-data'; /*