You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the console, you can see the mounted message of the ButtonDemo component, but the ButtonDemo component itself failed to render. Meanwhile, there are no warnings or error messages in the console regarding the rendering failure of the component.
If you only start the development server without building, the ButtonDemo component can be rendered normally.
In the reproduced component library packages, there are currently only two components. After bundling them, there might be two issues when importing the components button and toast in the example:
If useToast is used in ButtonDemo to get the context, it will definitely throw an error cannot find a ToastContext.
If useToast is not used in ButtonDemo to get the context, ButtonDemo will not be added to the DOM node, but its structure can still be printed in the console.
The most critical issue is that everything works fine in the development environment, but the above two problems only occur in the production environment.
Describe the bug
In the console, you can see the
mounted
message of theButtonDemo
component, but theButtonDemo
component itself failed to render. Meanwhile, there are no warnings or error messages in the console regarding the rendering failure of the component.If you only start the development server without building, the
ButtonDemo
component can be rendered normally.Your Example Website or App
https://github.com/thep0y/solid-context-demo
Steps to Reproduce the Bug or Issue
bun run build cd example bun run build bun run preview
Expected behavior
The
ButtonDemo
component renders normally.Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: