Skip to content
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

Not working with angular 8 in production mode #394

Closed
konsultaner opened this issue Jun 3, 2019 · 2 comments
Closed

Not working with angular 8 in production mode #394

konsultaner opened this issue Jun 3, 2019 · 2 comments

Comments

@konsultaner
Copy link

I used ICAL in my angular 6/7 project. After updating to angular 8 I got the error Uncaught ReferenceError: ICAL is not defined. When removing ICAL, The application works fine. I imported it like this:

import * as ICAL from 'ical.js';

Is there something wrong with this code?

if (typeof module === 'object') {
  // CommonJS, where exports may be different each time.
  ICAL = module.exports;
} else if (typeof ICAL !== 'object') {/* istanbul ignore next */
  /** @ignore */
  this.ICAL = {};
}
@konsultaner
Copy link
Author

Work around:

Add this to your polyfills.ts

(window as any).ICAL = {};

@kewisch
Copy link
Owner

kewisch commented Jan 13, 2020

There is a lot wrong with the module loader :) I'm thinking whatever we do in #329 will fix this.

@kewisch kewisch closed this as completed Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants