Open Trystan-SA opened 3 years ago
I think this has relation with this issue and https://github.com/IBM/carbon-components-svelte/issues/603...
I will test with your workaround and let you know!...
@Trystan-SA Where do made those changes? I mean on package.json of your project?
@deivinsontejeda The first one is the original, the second one is my modified version. I was trying to fix the issue by changing the source's .svelte files inside the carbon-components node_module's folders.
I didn't had to change any source file though, only changing it to "./src" instead of "./lib" did the trick.
Awesome @Trystan-SA thank you! But I think carbon has an issue with this. #603 is very similar to this one.
I will check your suggestion...
Node: 14.15.5 Svelte: 3.37.0 Carbon-components-svelte: 0.32.1 esbuild: 0.11.12 esbuild-svelte: 0.4.3
My svelte application crash (runtime) when I'm trying to hide a section with a #If statement that contains a carbon-components-svelte button.
First, the "isShow" variable is set to false, so the button is hidden. Then I click the first span element to set the "isShow" variable to true. This will show the button correctly. Then if I try to hide the button by clicking the other span element, my application raises an error and crash (the button is still visible and nothing respond anymore).
The code that crash is inside the svelte internal package (node_modules/svelte/internal/index.mjs). I still don't really know if it's the fault of carbon-components-svelte or svelte directly. Maybe it's the way Carbon call the transition function ? I fixed this in another project of mine by adding, "outros?.c?.push(()=>{" to the source code of svelte (but using es6 syntax is not really a good solution).
I played a little with the carbon-components-svelte package.json file. If i change this :
to this :
The issue will disappear (but the build time obviously increase up to 3/4 seconds) Maybe the issue comes from how this package is bundled ? I also use esbuild and esbuild-svelte, so maybe the issue com from my application bundle.