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

[fix] metadata issue, fixes #74 #83

Merged
merged 3 commits into from
Dec 5, 2018

Conversation

lucagouty
Copy link
Contributor

@lucagouty lucagouty commented Dec 5, 2018

Summary of changes:

  • Change imports to fix metadata issue

Honestly, I'm not sure what was the issue, but I found that fix in ngx-progressbar which had the same issue some time ago :

Other unrelated changes (I'll rollback if you want)

Intended/example use case:

Of course, first I made sure I was reproducing the issue, without this change, I get

ERROR in Error during template compile of 'CoreModule'
  Function calls are not supported in decorators but 'IntercomModule' was called.
: Unexpected value 'undefined' imported by the module 'CoreModule in /some/path/src/app/core/core.module.ts'
Error during template compile of 'CoreModule'
  Function calls are not supported in decorators but 'IntercomModule' was called.

With this fix, everything goes well now (Angular7, both ng build --prod and ng xi18n)

Checklist:

  • npm run build runs without error
  • ng serve spawns app, Intercom messenger is visible and interactive, and there are no errors in the console

Closes issue: #74

export { IntercomShowMessagesDirective } from './src/app/ng-intercom/directives/show-messages.directive'
export { IntercomShowNewMessageDirective } from './src/app/ng-intercom/directives/show-new-message.directive'
export { IntercomShutdownDirective } from './src/app/ng-intercom/directives/shutdown.directive'
export { IntercomTrackEventDirective } from './src/app/ng-intercom/directives/track-event.directive'
Copy link
Contributor Author

@lucagouty lucagouty Dec 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be enough, but I don't want to take a risk, so let me know if you want me to update it :

export { Intercom } from './src/app/ng-intercom/intercom/intercom'
export { IntercomConfig } from './src/app/ng-intercom/shared/intercom-config'
// export { IntercomHideDirective } from './src/app/ng-intercom/directives/hide.directive'
export { IntercomModule } from './src/app/ng-intercom/intercom.module'
// export { IntercomShowDirective } from './src/app/ng-intercom/directives/show.directive'
// export { IntercomShowMessagesDirective } from './src/app/ng-intercom/directives/show-messages.directive'
// export { IntercomShowNewMessageDirective } from './src/app/ng-intercom/directives/show-new-message.directive'
// export { IntercomShutdownDirective } from './src/app/ng-intercom/directives/shutdown.directive'
// export { IntercomTrackEventDirective } from './src/app/ng-intercom/directives/track-event.directive'

npm run test and ng serve both work with only those 3 exports (as does our app)

@scott-wyatt
Copy link
Member

Thank you for the PR! I'm going to close and reopen this to trigger the CI.

@scott-wyatt scott-wyatt closed this Dec 5, 2018
@scott-wyatt scott-wyatt reopened this Dec 5, 2018
@scott-wyatt scott-wyatt merged commit a156d7a into CaliStyle:master Dec 5, 2018
@lucagouty lucagouty changed the title Hotfix/metadata issue [fix] metadata issue Dec 5, 2018
@lucagouty lucagouty changed the title [fix] metadata issue [fix] metadata issue, fixes #74 Dec 5, 2018
@scott-wyatt
Copy link
Member

This will be released in #84 release 7.0.0-beta.1

@wbhob
Copy link
Contributor

wbhob commented Dec 5, 2018

thanks so much for your work, Luca !

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

Successfully merging this pull request may close these issues.

3 participants