evertonrobertoauler / universal-demo-v5

26 stars 14 forks source link

issue with integrating the ngx-bootstrap, ng-bootstrap #1

Closed jinnabaalu closed 6 years ago

jinnabaalu commented 6 years ago

I have tried integrating the ng-bootstrap and ngx-bootstrap

everytime i integrate any of the above i am facing issue with the modules.

image

Can you please try any of the package.

When I run with ng serve it works fine.

but when i run npm run build && node dist/server.js

jinnabaalu commented 6 years ago

None of the package is working

ng4-geoautocomplete

i have tried this package

can you integrate any of the package and try to replicate it

evertonrobertoauler commented 6 years ago

You need to add those libraries to your webpack config, in the whitelist array:

whitelist: [/ngx-bootstrap/, /ng4-geoautocomplete/]

Like I did in the commit bellow:

https://github.com/evertonrobertoauler/universal-demo-v5/commit/4cc4e6f2fd2c2ac7137ad29c3053ebf14d67ac7b

but if you run node dist/server.js and a message like: window or document is undefined, there is nothing we can do, because the library is not made with universal support in mind.