-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ship system.register bundle #64
Comments
I've so far got this working (i.e. no error when I run the app) by bringing the typescript source ts files locally, compiling with my tsconfig settings ("module": "system"), and putting them in a folder in my app, and referencing them as:
|
This project doesn't yet ship bundles like Angular 2 does. I have a branch where I've started creating a System-register-format bundle. In the mean time, Angular 2's non-bundled distribution is the same as this project, CJS+corresponding d.ts files. Since it sounds like you're using System loader to load your project, you just have to add this to your System.config: System.config({
paths: {
angularfire2: 'node_modules/angularfire2/'
},
packages: {
angularfire2: {
main: 'angularfire2.js',
defaultExtension: 'js'
}
}
} |
I updated the issue title and will leave it open as a reminder to ship the bundle. |
Oops, I guess I already merged the logic that creates the bundles, just haven't incorporated it into the publish process yet: https://github.com/angular/angularfire2/blob/master/package.json#L12 |
I pulled down angularfire2 from npm, added the script reference to my html and got cracking trying things out, and very quickly hit an issue that the typescript has been compiled in a way that needs require to work.
As an angular2 novice, I started with the guide from the docs (https://angular.io/docs/ts/latest/quickstart.html) and so have used the tsconfig.json they've outlined there. The angular2 js files themselves from npm are also using system.js.
Should this library not have the same typescript compilation settings to angular2?
Or perhaps I'm thinking about this wrong, maybe the npm package should include the ts files instead of the js, so the user compiles it according to their own tsconfig?
The text was updated successfully, but these errors were encountered: