salemdar / angular2-cookie

Implementation of Angular 1.x $cookies service to Angular 2
MIT License
109 stars 29 forks source link

v1.2.6 Does not work with Rollup.js #52

Open lfarran opened 7 years ago

lfarran commented 7 years ago

With Angular 4.0.0 rollup AOT builds:

{ Error: 'CookieService' is not exported by node_modules/angular2-cookie/core.js at error (node_modules/rollup/src/utils/error.js:2:14) at Module.error$1 [as error] (/node_modules/rollup/src/Module.js:303:2) at Module.trace (/node_modules/rollup/src/Module.js:400:10) at ModuleScope.findDeclaration (/node_modules/rollup/src/ast/scopes/ModuleScope.js:52:22) at Identifier.bind (/node_modules/rollup/src/ast/nodes/Identifier.js:22:29) at /node_modules/rollup/src/ast/Node.js:6:34 at ArrayExpression.eachChild (/node_modules/rollup/src/ast/Node.js:18:20) at ArrayExpression.bind (/node_modules/rollup/src/ast/Node.js:6:8) at /node_modules/rollup/src/ast/Node.js:6:34 at Node.eachChild (/node_modules/rollup/src/ast/Node.js:21:5) code: 'MISSING_EXPORT', url: 'https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module', pos: 781, loc:

lfarran commented 7 years ago

Work around: Change: import { CookieService } from 'angular2-cookie/core';

To: import { CookieService } from 'angular2-cookie/services';