Skip to content

Commit

Permalink
[BUGFIX release] Fix global build (#5035)
Browse files Browse the repository at this point in the history
The global build of ember-data has been broken since #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:
```
<!DOCTYPE html>
<html>
  <head>
    <script src="http://builds.emberjs.com/tags/v2.13.1/ember.prod.js"></script>
    <script src="http://builds.emberjs.com/tags/v2.14.3/ember-data.js"></script>
  </head>
  <body>
    <h1>Hello, Ember!</h1>
  </body>
</html>
```

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.
(cherry picked from commit 17bf1b7)
  • Loading branch information
tricknotes authored and bmac committed Jul 21, 2017
1 parent 25a10a8 commit a8908dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/initializers/ember-data.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import setupContainer from 'ember-data/setup-container';
import 'ember-data/index';
import 'ember-data';

/*
Expand Down

0 comments on commit a8908dc

Please sign in to comment.