I would like to use apexcharts and ng-apexcharts in angular 18 with SSR , i have this problem:
I would like to use apexcharts and ng-apexcharts in angular 18 with SSR , i have this problem:
when i aould like to use apxcharts and ng-apexcharts in angular 18 with ssr , i have this problem:
window is not defined
NOTE: Raw file sizes do not reflect development server per-request transformations.
➜ Local: http://localhost:50196/
➜ press h + enter to show help
5:35:51 AM [vite] Error when evaluating SSR module /main.server.mjs:
|- ReferenceError: window is not defined
at node_modules/apexcharts/dist/apexcharts.common.js (c:/Users/lakhm/Desktop/cod_manager/node_modules/apexcharts/dist/apexcharts.common.js:6:398992)
at __require2 (C:/Users/lakhm/Desktop/cod_manager/.angular/vite-root/cod_manager/chunk-IOFBTDQ2.mjs:47:50)
at eval (c:/Users/lakhm/Desktop/cod_manager/node_modules/ng-apexcharts/fesm2020/ng-apexcharts.mjs:4:24)
at async instantiateModule (file:///C:/Users/lakhm/Desktop/cod_manager/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:55058:9)