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

Issues when trying to serve via SSR #11

Open
astr0sl0th opened this issue Jun 11, 2019 · 0 comments
Open

Issues when trying to serve via SSR #11

astr0sl0th opened this issue Jun 11, 2019 · 0 comments

Comments

@astr0sl0th
Copy link

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

Current behavior

When building for your app to be rendered server side using Angular Universal nb-choices imports the choices.js lib into the built server.js file which causes an error since there are calls to the document (possibly window too) which aren't supported in node.

Expected behavior

Should only load choices.js client side as needed

Minimal reproduction of the problem with instructions

ng add @nguniversal/express-engine --clientProject your-project
npm run build:ssr && npm run serve:ssr

What is the motivation / use case for changing the behavior?

So you can use this lib when rendering your app on the server

Environment


Angular version: 8.02


Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
Others:

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

1 participant