diff --git a/package.json b/package.json index 2e39650a3..34339aefc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ui-router-ng2", "description": "State-based routing for Angular 2", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "scripts": { "clean": "shx rm -rf lib lib-esm _bundles _dec", "compile": "npm run clean && ngc", @@ -39,7 +39,7 @@ "module": "lib/index.js", "typings": "lib/index.d.ts", "dependencies": { - "ui-router-core": "=4.0.0", + "ui-router-core": "=5.0.0", "ui-router-rx": "=0.2.1" }, "peerDependencies": { diff --git a/rollup.config.js b/rollup.config.js index 53e12efc5..cb2085389 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -22,7 +22,7 @@ uglifyOpts.output.comments = (node, comment) => comment.type === 'comment2' && /@license/i.test(comment.value); let plugins = [ - nodeResolve({jsnext: true}), + nodeResolve({ jsnext: true }), progress(), sourcemaps(), commonjs(), @@ -41,9 +41,14 @@ function onwarn(warning) { } function isExternal(id) { + // ui-router-core and ui-router-rx should be external // All rxjs and @angular/* should be external // except for @angular/router/src/router_config_loader - let externals = [ /^rxjs/, /^@angular\/(?!router\/src\/router_config_loader)/, ]; + let externals = [ + /^ui-router-(core|rx)/, + /^rxjs/, + /^@angular\/(?!router\/src\/router_config_loader)/, + ]; return externals.map(regex => regex.exec(id)).reduce((acc, val) => acc || !!val, false); } @@ -89,6 +94,8 @@ const CONFIG = { 'rxjs/operator/filter': 'Rx.Observable.prototype', 'rxjs/operator/concatMap': 'Rx.Observable.prototype', + 'ui-router-core': 'ui-router-core', + 'ui-router-rx': 'ui-router-rx', '@angular/core': 'ng.core', '@angular/common': 'ng.common', }