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

Angular 6 support #49

Merged
merged 6 commits into from
May 30, 2018
Merged

Angular 6 support #49

merged 6 commits into from
May 30, 2018

Conversation

Koslun
Copy link
Contributor

@Koslun Koslun commented May 10, 2018

Experimental Angular 6 support. Upgraded most modules and configurations that seemed relevant, mainly using steps outlined here: https://update.angular.io/. Should work for regular usage but not ready for merge to keep what I think is the development environment intact.

Tests seem to pass and can run the regular client development environment where Intercom does get launched and seem to work.

Building for the server however fails, also meaning that npm test ultimately fails due to ending with building and running a server client. Here is the error:

ERROR in ./src/server.ts
Module build failed: TypeError: Cannot read property 'ts' of undefined
    at getLoaderOptions (C:\Users\Koslun\repos\ng-intercom\node_modules\ts-loader\dist\index.js:70:44)
    at Object.loader (C:\Users\Koslun\repos\ng-intercom\node_modules\ts-loader\dist\index.js:23:19)

ERROR in ./src/server.test.ts
Module build failed: TypeError: Cannot read property 'ts' of undefined
    at getLoaderOptions (C:\Users\Koslun\repos\ng-intercom\node_modules\ts-loader\dist\index.js:70:44)
    at Object.loader (C:\Users\Koslun\repos\ng-intercom\node_modules\ts-loader\dist\index.js:23:19)

Agreed to add webpack-cli automatically the first time another seemingly related issue occurred.

Quite unfamiliar with the used SSR configuration, NGRX, ng-engine and trails config used in the library. And as it at least seems to have reached the goal of implementing Angular 6 for downstream consumers I'm hoping to leave the rest of the work for someone else. Where I hope this will either help someone else with a PR of the very same purpose or allow someone to simply iterate in this PR.

Closes #47

@Koslun
Copy link
Contributor Author

Koslun commented May 10, 2018

Have a working example app using this PR here: https://github.com/Koslun/ng-example-app/tree/feat/ng6-intercom

Add this to your package.json to use this PR in your project:

"ng-intercom": "koslun/ng-intercom#641d32430d91c259e76f9f8ebef255675a3a63ef",

or

"ng-intercom": "koslun/ng-intercom#rxjs6-dist",

It points to the built distribution of this PR rather than the source code, so that it matches up with what is otherwise provided to npm. Here is that branch: https://github.com/Koslun/ng-intercom/tree/rxjs6-dist.

@Koslun Koslun mentioned this pull request May 10, 2018
@scott-wyatt
Copy link
Member

@Koslun excellent work! I'll update the last part of this SSR stuff, since that is CS Technologies specific and get this merged in as soon as possible.

@Koslun
Copy link
Contributor Author

Koslun commented May 11, 2018

@scott-wyatt awesome! Thanks for continued support and an awesome library!

@scott-wyatt scott-wyatt merged commit 5e22e49 into CaliStyle:master May 30, 2018
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.

2 participants