Skip to content

Commit 5cb8025

Browse files
committed
docs(CHANGELOG): add breaking change note about packaging
1 parent 1d7f70b commit 5cb8025

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

CHANGELOG.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,27 @@
1717
* **utils:** Add $exists method to AFUnwrappedSnapshot ([#471](https://github.com/angular/angularfire2/issues/471)) ([f67aab1](https://github.com/angular/angularfire2/commit/f67aab1))
1818
* upgrade to RC7 ([#505](https://github.com/angular/angularfire2/issues/505)) ([2410b2d](https://github.com/angular/angularfire2/commit/2410b2d))
1919

20+
### BREAKING CHANGES
21+
22+
The way this project is packaged has changed to be consistent with other Angular packages.
23+
Previously:
24+
25+
* The project just consisted of CommonJS modules, with `angularfire2.js` as the main entry point.
26+
* The project provided an `es6` directory which contained es2015 modules and es2015 JS
27+
* Package.json included `main` and `jsnext:main` fields, pointing to `angularfire2.js` and `es6/angularfire2.js`, respectively.
28+
29+
Now:
30+
31+
* The project ships ES2015 modules with ES5 JS at the root, as well as an ES5 UMD bundle at `bundles/angulafire2.umd.js`
32+
* The `main` field of `package.json` points to `bundles/angularfire2.umd.js`.
33+
* Instead of `jsnext:main`, we're using the `module` field of package.json to point to `index.js`.
34+
* Instead of `angularfire2.js` being the main entry point, an `index.js` has been added (though angulafire2.js hasn't changed significantly).
35+
36+
If you're using Rollup or Webpack, they should _just work_ with this new setup (please open issues if not). If using SystemJS, you should be able to
37+
add `format: 'esm'` inside of the packages configuration, and it should load and parse the es2015 modules correctly.
2038

39+
The addition of the umd bundle will also make it possible to use AngularFire2 in a `<script>` tag, such as in a plunker or JSBin. The library is
40+
exported on a global called `angularFire2`.
2141

2242
<a name="2.0.0-beta.4"></a>
2343
# [2.0.0-beta.4](https://github.com/angular/angularfire2/compare/2.0.0-beta.2...v2.0.0-beta.3) (2016-08-22)
@@ -77,7 +97,7 @@ apps are configured, and how third-party oauth tokens are handled.
7797
## Breaking Changes:
7898
* [Upgrade to the Firebase 3.0+ SDK](https://firebase.google.com/docs/web/setup), versions less than 3.0 are not supported. [abe11a2](https://github.com/angular/angularfire2/pull/200/commits/abe11a2fd8f5a3f554056625b751e9308e56b906)
7999
* `defaultFirebase` takes in a configuration object rather than a database url string. [See docs for more info.](https://github.com/angular/angularfire2/blob/master/docs/1-install-and-setup.md)
80-
* Access tokens for third party auth (github, google, facebook, twitter) are not persisted after refresh.
100+
* Access tokens for third party auth (github, google, facebook, twitter) are not persisted after refresh.
81101

82102
# AngularFire2 2.0.0-beta.0
83103

0 commit comments

Comments
 (0)