solidjs/templates

Weird bundle issues with ts-route template and apex-charts library

danielo515 opened this issue · 2 comments

Hello folks! I'm having a weird error with the apex-charts solid wrapper. Internally it uses a reference to a dom node, and in development it works perfectly. But as soon as I bundle it for production, when it tries to access the dom node reference within the onMount callback the dom node reference is undefined and it throws because it passes undefined to apex-charts.
Here is the code of the wrapper: https://github.com/wobsoriano/solid-apexcharts/blob/master/src/SolidApexCharts.tsx#L69-L88
Everything looks correct. At the beginning I thought it may be a problem with the library, but then I copied the library code into my project (this one was easy, it's a single file) and now it works perfectly both in dev and in production bundle, so this is clearly a bundling problem.
Can it be related to different solid versions? Yarn tells me that there is only one solid version installed, so that should not be it.

Hey, sorry for the delay.

I know it's been almost a year, but do you still have issues? :)